[FFmpeg-cvslog] Merge commit '248dc5c1646dcdd96fe79761105c4ae889e711fd'

James Almer git at videolan.org
Wed Oct 4 02:13:17 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Oct  3 20:09:46 2017 -0300| [73c85d3af2420baeee9a8f0429b34012096606ea] | committer: James Almer

Merge commit '248dc5c1646dcdd96fe79761105c4ae889e711fd'

* commit '248dc5c1646dcdd96fe79761105c4ae889e711fd':
  h264dec: fix dropped initial SEI recovery point

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73c85d3af2420baeee9a8f0429b34012096606ea
---

 libavcodec/h264dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 49ebeca6d8..f29c3f9048 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -499,7 +499,6 @@ void ff_h264_flush_change(H264Context *h)
     ff_h264_unref_picture(h, &h->last_pic_for_ec);
 
     h->first_field = 0;
-    ff_h264_sei_uninit(&h->sei);
     h->recovery_frame = -1;
     h->frame_recovered = 0;
     h->current_slice = 0;
@@ -515,6 +514,7 @@ static void flush_dpb(AVCodecContext *avctx)
     memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
 
     ff_h264_flush_change(h);
+    ff_h264_sei_uninit(&h->sei);
 
     for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
         ff_h264_unref_picture(h, &h->DPB[i]);


======================================================================

diff --cc libavcodec/h264dec.c
index 49ebeca6d8,6d7aa7b53c..f29c3f9048
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@@ -487,23 -449,11 +487,22 @@@ void ff_h264_flush_change(H264Context *
      h->next_outputed_poc = INT_MIN;
      h->prev_interlaced_frame = 1;
      idr(h);
 -    if (h->cur_pic_ptr)
 +
 +    h->poc.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;
 +    }
 +    ff_h264_unref_picture(h, &h->last_pic_for_ec);
 +
      h->first_field = 0;
-     ff_h264_sei_uninit(&h->sei);
      h->recovery_frame = -1;
      h->frame_recovered = 0;
 +    h->current_slice = 0;
 +    h->mmco_reset = 1;
  }
  
  /* forget old pics after a seek */



More information about the ffmpeg-cvslog mailing list