diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-08-21 11:54:04 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:15:49 +0200 |
commit | ef7ae1b8e8ac2255e70c80cbfff906d45e956761 (patch) | |
tree | 7605ec0bb4ed357c1547be0cafe3098777cf2909 /av_sub.c | |
parent | a4e62de5dc1cf79a80a79e56dd58cd151f008429 (diff) | |
download | mpv-ef7ae1b8e8ac2255e70c80cbfff906d45e956761.tar.bz2 mpv-ef7ae1b8e8ac2255e70c80cbfff906d45e956761.tar.xz |
av_sub: Pass video dimensions specified in subtitle to spudec
Makes DVD-resolution PGS subs work correctly.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32005 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'av_sub.c')
-rw-r--r-- | av_sub.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -39,7 +39,6 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, doub { AVCodecContext *ctx = sh->context; enum CodecID cid = CODEC_ID_NONE; - int srcw = 0, srch = 0; int new_type = 0; int res; int got_sub; @@ -50,7 +49,6 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, doub 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; @@ -87,7 +85,7 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, doub 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], |