]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: Use the decoders dimensions in sub2video_get_blank_frame()
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 15 Aug 2015 15:28:21 +0000 (17:28 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 15 Aug 2015 15:41:48 +0000 (17:41 +0200)
Fixes Ticket4744 part3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ffmpeg.c

index fd59c3c6e3ca48f0fabad9126c877a910f8b5551..d20f56bb80f6d3eebfc368540daf2af66265a89d 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -172,8 +172,8 @@ static int sub2video_get_blank_frame(InputStream *ist)
     AVFrame *frame = ist->sub2video.frame;
 
     av_frame_unref(frame);
-    ist->sub2video.frame->width  = ist->sub2video.w;
-    ist->sub2video.frame->height = ist->sub2video.h;
+    ist->sub2video.frame->width  = ist->dec_ctx->width  ? ist->dec_ctx->width  : ist->sub2video.w;
+    ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h;
     ist->sub2video.frame->format = AV_PIX_FMT_RGB32;
     if ((ret = av_frame_get_buffer(frame, 32)) < 0)
         return ret;