aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-03 01:47:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-03 01:47:16 +0200
commit0558832796b0be1fb8817ba8b7cbfa9d5cf765ee (patch)
treeb7e8576dd3576ebb1668094a35cb925270e856f9 /libavcodec
parentced5c8e6b36fa219cf7ea7d934da2105ae99a887 (diff)
parenta7cce9ebf3ae3b9678970236c964900393603a73 (diff)
downloadffmpeg-0558832796b0be1fb8817ba8b7cbfa9d5cf765ee.tar.gz
Merge commit 'a7cce9ebf3ae3b9678970236c964900393603a73' into release/0.10
* commit 'a7cce9ebf3ae3b9678970236c964900393603a73': h264: reset first_field if frame_start() fails for missing refs Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5145343887..d15b00ca15 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2996,8 +2996,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
h->frame_num != (h->prev_frame_num + 1) % (1 << h->sps.log2_max_frame_num)) {
Picture *prev = h->short_ref_count ? h->short_ref[0] : NULL;
av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n", h->frame_num, h->prev_frame_num);
- if (ff_h264_frame_start(h) < 0)
+ if (ff_h264_frame_start(h) < 0) {
+ h0->s.first_field = 0;
return -1;
+ }
h->prev_frame_num++;
h->prev_frame_num %= 1<<h->sps.log2_max_frame_num;
s->current_picture_ptr->frame_num= h->prev_frame_num;