Skip to content

Commit

Permalink
AVcodec: use avctx width for subtitles when set
Browse files Browse the repository at this point in the history
Instead of hardcoding it depending on the codec

Tested with PGS and XSub
  • Loading branch information
jbkempf committed May 20, 2014
1 parent 5cedfe6 commit ba02909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/codec/avcodec/subtitle.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static subpicture_t *ConvertSubtitle(decoder_t *dec, AVSubtitle *ffsub, mtime_t
spu->b_absolute = true; /* FIXME How to set it right ? */
spu->b_ephemer = true; /* FIXME How to set it right ? */

if (avctx->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE) {
if (avctx->coded_width != 0 && avctx->coded_height != 0) {
spu->i_original_picture_width = avctx->coded_width;
spu->i_original_picture_height = avctx->coded_height;
} else {
Expand Down

0 comments on commit ba02909

Please sign in to comment.