[FFmpeg-cvslog] ffmpeg: Use the decoders dimensions in sub2video_get_blank_frame()
Michael Niedermayer
git at videolan.org
Sun Aug 16 02:16:16 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Aug 15 17:28:21 2015 +0200| [4ada49f9dbed6ab1a84cf2d79f0e8b5e549b0b6a] | committer: Michael Niedermayer
ffmpeg: Use the decoders dimensions in sub2video_get_blank_frame()
Fixes Ticket4744 part3
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ada49f9dbed6ab1a84cf2d79f0e8b5e549b0b6a
---
ffmpeg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index fd59c3c..d20f56b 100644
--- 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;
More information about the ffmpeg-cvslog
mailing list