changeset 5772:65b71bd21a4d libavcodec

Fix h->curr_pic_num for field pictures. Necessary for proper PAFF support. patch by Jeff Downs, heydowns a borg d com original thread: Subject: [FFmpeg-devel] [PATCH] Implement PAFF in H.264 Date: 18/09/07 20:30
author andoma
date Thu, 04 Oct 2007 06:43:58 +0000
parents 5290a3850c03
children e3d7a78e2df3
files h264.c h264.h
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Thu Oct 04 06:41:49 2007 +0000
+++ b/h264.c	Thu Oct 04 06:43:58 2007 +0000
@@ -3742,7 +3742,7 @@
         h->curr_pic_num=   h->frame_num;
         h->max_pic_num= 1<< h->sps.log2_max_frame_num;
     }else{
-        h->curr_pic_num= 2*h->frame_num;
+        h->curr_pic_num= 2*h->frame_num + 1;
         h->max_pic_num= 1<<(h->sps.log2_max_frame_num + 1);
     }
 
--- a/h264.h	Thu Oct 04 06:41:49 2007 +0000
+++ b/h264.h	Thu Oct 04 06:43:58 2007 +0000
@@ -285,7 +285,7 @@
     int prev_frame_num;           ///< frame_num of the last pic for POC type 1/2
 
     /**
-     * frame_num for frames or 2*frame_num for field pics.
+     * frame_num for frames or 2*frame_num+1 for field pics.
      */
     int curr_pic_num;