summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-22 07:59:10 +0100
committerAnton Khirnov <anton@khirnov.net>2013-04-10 20:54:27 +0200
commit9de9b828ef005dec37052548c195a6b4f18fc701 (patch)
treec0254d547c7fc025d0f6df4fe7ff9fc4316216f4 /libavcodec
parent2d6edb2b7ebc400d1a4fd5b95a30e4b4415b94f9 (diff)
lavc: don't overwrite display dimensions with coded dimensions.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 46486a2ff7..dfb2f541e7 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);