[FFmpeg-cvslog] lavc: don't overwrite display dimensions with coded dimensions.

Anton Khirnov git at videolan.org
Thu Apr 11 15:44:37 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Mar 22 07:59:10 2013 +0100| [9de9b828ef005dec37052548c195a6b4f18fc701] | committer: Anton Khirnov

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9de9b828ef005dec37052548c195a6b4f18fc701
---

 libavcodec/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 46486a2..dfb2f54 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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);



More information about the ffmpeg-cvslog mailing list