Commit 9de9b828 authored by Anton Khirnov's avatar Anton Khirnov

lavc: don't overwrite display dimensions with coded dimensions.

parent 2d6edb2b
......@@ -905,7 +905,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
if ((ret = av_opt_set_dict(avctx, &tmp)) < 0)
goto free_and_end;
if (avctx->coded_width && avctx->coded_height)
if (avctx->coded_width && avctx->coded_height && !avctx->width && !avctx->height)
avcodec_set_dimensions(avctx, avctx->coded_width, avctx->coded_height);
else if (avctx->width && avctx->height)
avcodec_set_dimensions(avctx, avctx->width, avctx->height);
......
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