[FFmpeg-cvslog] h264: reset last_pocs on IDRs

Michael Niedermayer git at videolan.org
Thu Nov 17 00:38:15 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 16 23:57:17 2011 +0100| [18b7f40007038f51ed3d9c39dcfc52e7a1655ceb] | committer: Michael Niedermayer

h264: reset last_pocs on IDRs

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/h264.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3ec8b85..e62574f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2371,11 +2371,14 @@ static void implicit_weight_table(H264Context *h, int field){
  * instantaneous decoder refresh.
  */
 static void idr(H264Context *h){
+    int i;
     ff_h264_remove_all_refs(h);
     h->prev_frame_num= 0;
     h->prev_frame_num_offset= 0;
     h->prev_poc_msb=
     h->prev_poc_lsb= 0;
+    for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++)
+        h->last_pocs[i] = INT_MIN;
 }
 
 /* forget old pics after a seek */



More information about the ffmpeg-cvslog mailing list