Commit 4ada49f9 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Use the decoders dimensions in sub2video_get_blank_frame()

Fixes Ticket4744 part3
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent bd5d11d9
...@@ -172,8 +172,8 @@ static int sub2video_get_blank_frame(InputStream *ist) ...@@ -172,8 +172,8 @@ static int sub2video_get_blank_frame(InputStream *ist)
AVFrame *frame = ist->sub2video.frame; AVFrame *frame = ist->sub2video.frame;
av_frame_unref(frame); av_frame_unref(frame);
ist->sub2video.frame->width = ist->sub2video.w; ist->sub2video.frame->width = ist->dec_ctx->width ? ist->dec_ctx->width : ist->sub2video.w;
ist->sub2video.frame->height = ist->sub2video.h; ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h;
ist->sub2video.frame->format = AV_PIX_FMT_RGB32; ist->sub2video.frame->format = AV_PIX_FMT_RGB32;
if ((ret = av_frame_get_buffer(frame, 32)) < 0) if ((ret = av_frame_get_buffer(frame, 32)) < 0)
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment