diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-12-18 13:29:25 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-12-19 10:15:58 +0300 |
commit | 45286a625c6ced1f5c4c842244cbb4509429abba (patch) | |
tree | c55d728226f215230e375240d0caddc7a654ac88 /libavcodec/h264_picture.c | |
parent | c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f (diff) |
h264dec: make sure to only end a field if it has been started
Calling ff_h264_field_end() when the per-field state is not properly
initialized leads to all kinds of undefined behaviour.
CC: libav-stable@libav.org
Bug-Id: 977 978 992
Diffstat (limited to 'libavcodec/h264_picture.c')
-rw-r--r-- | libavcodec/h264_picture.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index e22852a24f..24ba79df0e 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -194,6 +194,7 @@ int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup) emms_c(); h->current_slice = 0; + h->field_started = 0; return err; } |