mirror of https://git.ffmpeg.org/ffmpeg.git
lavc: don't overwrite display dimensions with coded dimensions.
This commit is contained in:
parent
2d6edb2b7e
commit
9de9b828ef
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue