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
1 changed files with 1 additions and 1 deletions

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