r32005 - trunk/av_sub.c
Author: reimar Date: Sat Aug 21 13:54:04 2010 New Revision: 32005 Log: Pass the video dimensions specified in the subtitle to spudec. Makes DVD-resolution PGS subs work correctly. Modified: trunk/av_sub.c Modified: trunk/av_sub.c ============================================================================== --- trunk/av_sub.c Sat Aug 21 13:36:18 2010 (r32004) +++ trunk/av_sub.c Sat Aug 21 13:54:04 2010 (r32005) @@ -38,7 +38,6 @@ int decode_avsub(struct sh_sub *sh, uint { AVCodecContext *ctx = sh->context; enum CodecID cid = CODEC_ID_NONE; - int srcw = 0, srch = 0; int new_type = 0; int res; int got_sub; @@ -49,7 +48,6 @@ int decode_avsub(struct sh_sub *sh, uint case 'b': cid = CODEC_ID_DVB_SUBTITLE; break; case 'p': - srcw = 1920; srch = 1080; cid = CODEC_ID_HDMV_PGS_SUBTITLE; break; case 'x': cid = CODEC_ID_XSUB; break; @@ -86,7 +84,7 @@ int decode_avsub(struct sh_sub *sh, uint switch (sub.rects[0]->type) { case SUBTITLE_BITMAP: if (!vo_spudec) - vo_spudec = spudec_new_scaled(NULL, srcw, srch, NULL, 0); + vo_spudec = spudec_new_scaled(NULL, ctx->width, ctx->height, NULL, 0); spudec_set_paletted(vo_spudec, sub.rects[0]->pict.data[0], sub.rects[0]->pict.linesize[0],
participants (1)
-
reimar