Merge commit '7fd6c9fb49573870b48a995947edc83eedd7e86e' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Apr 2014 13:28:24 +0000 (15:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Apr 2014 13:28:24 +0000 (15:28 +0200)
* commit '7fd6c9fb49573870b48a995947edc83eedd7e86e':
  h264: reset first_field if frame_start() fails for missing refs

Conflicts:
libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264.c

@@@ -2987,11 -2910,10 +2987,13 @@@ static int decode_slice_header(H264Cont
              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 (!h->sps.gaps_in_frame_num_allowed_flag)
 +                for(i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++)
 +                    h->last_pocs[i] = INT_MIN;
+             if (ff_h264_frame_start(h) < 0) {
+                 s0->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;