summaryrefslogtreecommitdiff
path: root/libavcodec/h264dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-12-27 19:07:18 +0100
committerAnton Khirnov <anton@khirnov.net>2017-01-12 16:28:05 +0100
commit4fded0480f20f4d7ca5e776a85574de34dfead14 (patch)
tree000be0b40f2cebfb57e013d99aa5d4728608e873 /libavcodec/h264dec.c
parenta02ae1c6837a54ed9e7735da2b1f789b2f4b6e13 (diff)
h264dec: be more explicit in handling container cropping
The current condition can trigger in cases where it shouldn't, with unexpected results. Make sure that: - container cropping is really based on the original dimensions from the caller - those dimenions are discarded on size change The code is still quite hacky and eventually should be deprecated and removed, with the decision about which cropping is used delegated to the caller.
Diffstat (limited to 'libavcodec/h264dec.c')
-rw-r--r--libavcodec/h264dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index e111d40c35..3209c1d4df 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -285,6 +285,9 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h->avctx = avctx;
+ h->width_from_caller = avctx->width;
+ h->height_from_caller = avctx->height;
+
h->picture_structure = PICT_FRAME;
h->workaround_bugs = avctx->workaround_bugs;
h->flags = avctx->flags;