h264dec: make sure to only end a field if it has been started
authorAnton Khirnov <anton@khirnov.net>
Sun, 18 Dec 2016 10:29:25 +0000 (11:29 +0100)
committerAnton Khirnov <anton@khirnov.net>
Mon, 19 Dec 2016 07:15:58 +0000 (08:15 +0100)
commit45286a625c6ced1f5c4c842244cbb4509429abba
treec55d728226f215230e375240d0caddc7a654ac88
parentc2fa6bb0e8703a7a6aa10e11f9ab36094416d83f
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
libavcodec/h264_picture.c
libavcodec/h264_slice.c
libavcodec/h264dec.c
libavcodec/h264dec.h