Merge commit '7a4f74eed51f914e9bbfebaffd4a92ac6791f819'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 13:22:49 +0000 (15:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 13:33:46 +0000 (15:33 +0200)
* commit '7a4f74eed51f914e9bbfebaffd4a92ac6791f819':
  h264: embed the DPB in the context

Conflicts:
libavcodec/h264.c

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

@@@ -1850,12 -1694,8 +1846,9 @@@ av_cold void ff_h264_free_context(H264C
  
      ff_h264_free_tables(h);
  
-     if (h->DPB) {
-         for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
-             ff_h264_unref_picture(h, &h->DPB[i]);
-         memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
-         av_freep(&h->DPB);
-     }
+     for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
+         ff_h264_unref_picture(h, &h->DPB[i]);
++    memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
  
      h->cur_pic_ptr = NULL;
  
@@@ -506,10 -468,9 +506,10 @@@ typedef struct H264Context 
      H264QpelContext h264qpel;
      GetBitContext gb;
  
-     H264Picture *DPB;
+     H264Picture DPB[H264_MAX_PICTURE_COUNT];
      H264Picture *cur_pic_ptr;
      H264Picture cur_pic;
 +    H264Picture last_pic_for_ec;
  
      H264SliceContext *slice_ctx;
      int            nb_slice_ctx;
Simple merge