diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-18 21:21:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-18 21:29:37 +0100 |
commit | 357a733f91ac96d5806856b83081f3f7dace01fe (patch) | |
tree | ec49bb3aac631d17b2adac5550ed7b0292fe87f4 /libavcodec/h264.c | |
parent | 06637c92952ce364dbb5add84b7643ed3fc25cac (diff) | |
parent | d1b3fabe6945e511bb20fc9ca52b47eb952526ee (diff) | |
download | ffmpeg-357a733f91ac96d5806856b83081f3f7dace01fe.tar.gz |
Merge commit 'd1b3fabe6945e511bb20fc9ca52b47eb952526ee'
* commit 'd1b3fabe6945e511bb20fc9ca52b47eb952526ee':
h264: reset first_field if frame_start() fails for missing refs
See: d7599bd8e240b923486bd130a33d38f66bb14eae
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 8366cdcf11..3c5e8e99d3 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3751,8 +3751,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0) for(i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++) h->last_pocs[i] = INT_MIN; ret = h264_frame_start(h); - if (ret < 0) + if (ret < 0) { + h0->first_field = 0; return ret; + } + h->prev_frame_num++; h->prev_frame_num %= 1 << h->sps.log2_max_frame_num; h->cur_pic_ptr->frame_num = h->prev_frame_num; |