Merge commit '71b8c8430cf3f7056849257324fc39b423075ba1' into release/0.10
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jun 2014 00:14:02 +0000 (02:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jun 2014 00:14:02 +0000 (02:14 +0200)
* commit '71b8c8430cf3f7056849257324fc39b423075ba1':
  sgidec: fix buffer size check in expand_rle_row()
  adx: check that the offset is not negative
  mpegvideo: set reference/pict_type on generated reference frames

Conflicts:
libavcodec/mpegvideo.c

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

@@@ -1235,18 -1268,13 +1235,23 @@@ int MPV_frame_start(MpegEncContext *s, 
  
              /* Allocate a dummy frame */
              i = ff_find_unused_picture(s, 0);
-             s->last_picture_ptr= &s->picture[i];
 +            if (i < 0)
 +                return i;
 -            s->last_picture_ptr->f.pict_type = AV_PICTURE_TYPE_I;
++
+             s->last_picture_ptr = &s->picture[i];
+             s->last_picture_ptr->f.reference   = 3;
 +            s->last_picture_ptr->f.key_frame = 0;
++            s->last_picture_ptr->f.pict_type = AV_PICTURE_TYPE_P;
              if (ff_alloc_picture(s, s->last_picture_ptr, 0) < 0)
                  return -1;
 +
 +            if(s->codec_id == CODEC_ID_FLV1 || s->codec_id == CODEC_ID_H263){
 +                for(i=0; i<avctx->height; i++)
 +                    memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 16, avctx->width);
 +            }
 +
              ff_thread_report_progress((AVFrame *) s->last_picture_ptr,
                                        INT_MAX, 0);
              ff_thread_report_progress((AVFrame *) s->last_picture_ptr,
              s->pict_type == AV_PICTURE_TYPE_B) {
              /* Allocate a dummy frame */
              i = ff_find_unused_picture(s, 0);
-             s->next_picture_ptr= &s->picture[i];
 +            if (i < 0)
 +                return i;
 -            s->next_picture_ptr->f.pict_type = AV_PICTURE_TYPE_I;
++
+             s->next_picture_ptr = &s->picture[i];
+             s->next_picture_ptr->f.reference   = 3;
 +            s->next_picture_ptr->f.key_frame = 0;
++            s->next_picture_ptr->f.pict_type = AV_PICTURE_TYPE_P;
              if (ff_alloc_picture(s, s->next_picture_ptr, 0) < 0)
                  return -1;
              ff_thread_report_progress((AVFrame *) s->next_picture_ptr,
Simple merge