]> git.sesse.net Git - ffmpeg/commitdiff
lavc: don't overwrite display dimensions with coded dimensions.
authorAnton Khirnov <anton@khirnov.net>
Fri, 22 Mar 2013 06:59:10 +0000 (07:59 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 10 Apr 2013 18:54:27 +0000 (20:54 +0200)
libavcodec/utils.c

index 46486a2ff7d7f2672331ef25d66ae1e9373e8137..dfb2f541e7789110268ff0c101fb46b3c3caed78 100644 (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);