changeset 7482:ecf3c774f5e1 libavcodec

Fill ref_count/ref_poc for both fields of frames.
author michael
date Mon, 04 Aug 2008 22:32:41 +0000
parents ca205cc57734
children edea5d7db24d
files h264.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Mon Aug 04 21:45:05 2008 +0000
+++ b/h264.c	Mon Aug 04 22:32:41 2008 +0000
@@ -926,6 +926,10 @@
         for(j=0; j<h->ref_count[list]; j++)
             cur->ref_poc[sidx][list][j] = h->ref_list[list][j].poc;
     }
+    if(s->picture_structure == PICT_FRAME){
+        memcpy(cur->ref_count[0], cur->ref_count[1], sizeof(cur->ref_count[0]));
+        memcpy(cur->ref_poc  [0], cur->ref_poc  [1], sizeof(cur->ref_poc  [0]));
+    }
     if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred)
         return;
     for(list=0; list<2; list++){