Skip to content

Commit

Permalink
Backport pull request #9671 from jellyfin/release-10.8.z
Browse files Browse the repository at this point in the history
Fix the canvas size for DVBSUB and DVDSUB subtitles

Original-merge: eba95cc

Merged-by: Joshua M. Boniface <joshua@boniface.me>

Backported-by: Bond_009 <bond.009@outlook.com>
  • Loading branch information
nyanmisaka authored and Bond-009 committed Jun 13, 2023
1 parent 4c8d382 commit fdc16e2
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 @@ -755,9 +755,12 @@ private string GetFilterHwDeviceArgs(string alias)

public string GetGraphicalSubCanvasSize(EncodingJobInfo state)
{
// DVBSUB and DVDSUB use the fixed canvas size 720x576
if (state.SubtitleStream is not 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 fdc16e2

Please sign in to comment.