ffmpeg_opt: store canvas size in decoder context
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 4 Nov 2014 19:19:04 +0000 (20:19 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 4 Nov 2014 19:55:15 +0000 (20:55 +0100)
Fixes canvas size
Fixes Ticket4074

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt.c

index 27e0890..fd13426 100644 (file)
@@ -704,7 +704,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
             MATCH_PER_STREAM_OPT(fix_sub_duration, i, ist->fix_sub_duration, ic, st);
             MATCH_PER_STREAM_OPT(canvas_sizes, str, canvas_size, ic, st);
             if (canvas_size &&
-                av_parse_video_size(&dec->width, &dec->height, canvas_size) < 0) {
+                av_parse_video_size(&ist->dec_ctx->width, &ist->dec_ctx->height, canvas_size) < 0) {
                 av_log(NULL, AV_LOG_FATAL, "Invalid canvas size: %s.\n", canvas_size);
                 exit_program(1);
             }