Merge commit '5eb488bfa835f2902a31ba99d57c16ae36c4f598'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 11 Aug 2013 08:28:49 +0000 (10:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 11 Aug 2013 08:28:49 +0000 (10:28 +0200)
* commit '5eb488bfa835f2902a31ba99d57c16ae36c4f598':
  h264: use explicit variable names for *_field_flag

Conflicts:
libavcodec/h264.c

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

@@@ -3207,11 -3120,12 +3207,12 @@@ static int decode_slice_header(H264Cont
  {
      unsigned int first_mb_in_slice;
      unsigned int pps_id;
 -    int num_ref_idx_active_override_flag, max_refs, ret;
 +    int num_ref_idx_active_override_flag, ret;
      unsigned int slice_type, tmp, i, j;
 -    int default_ref_list_done = 0;
      int last_pic_structure, last_pic_droppable;
 +    int must_reinit;
      int needs_reinit = 0;
+     int field_pic_flag, bottom_field_flag;
  
      h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab;
      h->me.qpel_avg = h->h264qpel.avg_h264_qpel_pixels_tab;
      if (h->sps.frame_mbs_only_flag) {
          h->picture_structure = PICT_FRAME;
      } else {
-         if (get_bits1(&h->gb)) { // field_pic_flag
-             h->picture_structure = PICT_TOP_FIELD + get_bits1(&h->gb); // bottom_field_flag
 +        if (!h->sps.direct_8x8_inference_flag && slice_type == AV_PICTURE_TYPE_B) {
 +            av_log(h->avctx, AV_LOG_ERROR, "This stream was generated by a broken encoder, invalid 8x8 inference\n");
 +            return -1;
 +        }
+         field_pic_flag = get_bits1(&h->gb);
+         if (field_pic_flag) {
+             bottom_field_flag = get_bits1(&h->gb);
+             h->picture_structure = PICT_TOP_FIELD + bottom_field_flag;
          } else {
              h->picture_structure = PICT_FRAME;
              h->mb_aff_frame      = h->sps.mb_aff;