Merge commit 'ecab21ac47d0d4ca604bebf494017ae5090853a8'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jan 2015 14:15:03 +0000 (15:15 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jan 2015 14:15:18 +0000 (15:15 +0100)
* commit 'ecab21ac47d0d4ca604bebf494017ae5090853a8':
  h264: do not reset the ref lists in flush_change()

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

@@@ -1076,20 -1054,9 +1076,16 @@@ void ff_h264_flush_change(H264Context *
      h->outputed_poc          = h->next_outputed_poc = INT_MIN;
      h->prev_interlaced_frame = 1;
      idr(h);
 -    if (h->cur_pic_ptr)
 +
 +    h->prev_frame_num = -1;
 +    if (h->cur_pic_ptr) {
          h->cur_pic_ptr->reference = 0;
 +        for (j=i=0; h->delayed_pic[i]; i++)
 +            if (h->delayed_pic[i] != h->cur_pic_ptr)
 +                h->delayed_pic[j++] = h->delayed_pic[i];
 +        h->delayed_pic[j] = NULL;
 +    }
      h->first_field = 0;
-     memset(h->ref_list[0], 0, sizeof(h->ref_list[0]));
-     memset(h->ref_list[1], 0, sizeof(h->ref_list[1]));
-     memset(h->default_ref_list[0], 0, sizeof(h->default_ref_list[0]));
-     memset(h->default_ref_list[1], 0, sizeof(h->default_ref_list[1]));
      ff_h264_reset_sei(h);
      h->recovery_frame = -1;
      h->frame_recovered = 0;