diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-12-27 21:07:18 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-01-12 18:28:05 +0300 |
commit | 4fded0480f20f4d7ca5e776a85574de34dfead14 (patch) | |
tree | 000be0b40f2cebfb57e013d99aa5d4728608e873 /libavcodec/h264dec.h | |
parent | a02ae1c6837a54ed9e7735da2b1f789b2f4b6e13 (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.h')
-rw-r--r-- | libavcodec/h264dec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 5957e795e6..0a9896ac8a 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -514,6 +514,11 @@ typedef struct H264Context { * the slice data */ int field_started; + /* original AVCodecContext dimensions, used to handle container + * cropping */ + int width_from_caller; + int height_from_caller; + AVFrame *output_frame; int enable_er; |