[FFmpeg-devel] [PATCH 1/2] ffplay: use decoder avctx for decoded subtitle width/height

Marton Balint cus at passwd.hu
Sat Oct 1 19:17:41 EEST 2016


Fixes ticket #5873.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffplay.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index e64909a..a7a6785 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2224,7 +2224,6 @@ static int video_thread(void *arg)
 static int subtitle_thread(void *arg)
 {
     VideoState *is = arg;
-    AVCodecParameters *codecpar = is->subtitle_st->codecpar;
     Frame *sp;
     int got_subtitle;
     double pts;
@@ -2243,8 +2242,8 @@ static int subtitle_thread(void *arg)
                 pts = sp->sub.pts / (double)AV_TIME_BASE;
             sp->pts = pts;
             sp->serial = is->subdec.pkt_serial;
-            sp->width = codecpar->width;
-            sp->height = codecpar->height;
+            sp->width = is->subdec.avctx->width;
+            sp->height = is->subdec.avctx->height;
             sp->uploaded = 0;
 
             /* now we can update the picture count */
-- 
2.6.6



More information about the ffmpeg-devel mailing list