Skip to content

Commit

Permalink
Fix the canvas size for DVBSUB and DVDSUB subtitles (jellyfin#9671)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanmisaka committed Apr 27, 2023
1 parent b70305a commit 5ecb8a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,12 @@ private string GetFilterHwDeviceArgs(string alias)

public string GetGraphicalSubCanvasSize(EncodingJobInfo state)
{
// DVBSUB and DVDSUB use the fixed canvas size 720x576
if (state.SubtitleStream != null
&& state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode
&& !state.SubtitleStream.IsTextSubtitleStream)
&& !state.SubtitleStream.IsTextSubtitleStream
&& !string.Equals(state.SubtitleStream.Codec, "DVBSUB", StringComparison.OrdinalIgnoreCase)
&& !string.Equals(state.SubtitleStream.Codec, "DVDSUB", StringComparison.OrdinalIgnoreCase))
{
var inW = state.VideoStream?.Width;
var inH = state.VideoStream?.Height;
Expand Down

0 comments on commit 5ecb8a6

Please sign in to comment.