Merge commit 'ac1fc92ea410c396594fcd79f5d4491fe6a8cc90'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 6 Dec 2013 02:55:12 +0000 (03:55 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 6 Dec 2013 02:55:12 +0000 (03:55 +0100)
* commit 'ac1fc92ea410c396594fcd79f5d4491fe6a8cc90':
  vc1dec: move setting repeat_pict after frame_start() has been called.

Conflicts:
libavcodec/vc1dec.c

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

@@@ -6000,23 -5943,6 +6000,11 @@@ static int vc1_decode_frame(AVCodecCont
          goto err;
      }
  
-     // process pulldown flags
-     s->current_picture_ptr->f.repeat_pict = 0;
-     // Pulldown flags are only valid when 'broadcast' has been set.
-     // So ticks_per_frame will be 2
-     if (v->rff) {
-         // repeat field
-         s->current_picture_ptr->f.repeat_pict = 1;
-     } else if (v->rptfrm) {
-         // repeat frames
-         s->current_picture_ptr->f.repeat_pict = v->rptfrm * 2;
-     }
 +    if ((s->mb_height >> v->field_mode) == 0) {
 +        av_log(v->s.avctx, AV_LOG_ERROR, "image too short\n");
 +        goto err;
 +    }
 +
      // for skipping the frame
      s->current_picture.f.pict_type = s->pict_type;
      s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I;
          goto err;
      }
  
 +    v->s.current_picture_ptr->f.interlaced_frame = (v->fcm != PROGRESSIVE);
 +    v->s.current_picture_ptr->f.top_field_first  = v->tff;
 +
+     // process pulldown flags
+     s->current_picture_ptr->f.repeat_pict = 0;
+     // Pulldown flags are only valid when 'broadcast' has been set.
+     // So ticks_per_frame will be 2
+     if (v->rff) {
+         // repeat field
+         s->current_picture_ptr->f.repeat_pict = 1;
+     } else if (v->rptfrm) {
+         // repeat frames
+         s->current_picture_ptr->f.repeat_pict = v->rptfrm * 2;
+     }
      s->me.qpel_put = s->dsp.put_qpel_pixels_tab;
      s->me.qpel_avg = s->dsp.avg_qpel_pixels_tab;