diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-11-28 10:54:35 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-01-18 20:42:21 +0100 |
commit | 00dbff4c3e048b4abd01bf805725aabff0fa5ee1 (patch) | |
tree | 268386198f4104b7b3eaf717d8a7a24537d0c42d /libavcodec | |
parent | 7f0e81db3c4ee6f8ce15058bafa72ce928a89f3f (diff) | |
download | ffmpeg-00dbff4c3e048b4abd01bf805725aabff0fa5ee1.tar.gz |
h264: do not call field_end if we do not have a current picture
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9817d20781..ed5aea8e1a 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3348,7 +3348,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) first_mb_in_slice = get_ue_golomb(&h->gb); if (first_mb_in_slice == 0) { // FIXME better field boundary detection - if (h0->current_slice && FIELD_PICTURE(h)) { + if (h0->current_slice && h->cur_pic_ptr && FIELD_PICTURE(h)) { field_end(h, 1); } |