1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

This commit is contained in:
Anton Khirnov 2013-03-22 07:59:10 +01:00
parent 2d6edb2b7e
commit 9de9b828ef

View File

@ -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);