Commit ba02909b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

AVcodec: use avctx width for subtitles when set

Instead of hardcoding it depending on the codec

Tested with PGS and XSub
parent 5cedfe6d
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment