Fix h->curr_pic_num for field pictures. Necessary for proper PAFF support.
authorJeff Downs <heydowns@borg.com>
Thu, 4 Oct 2007 06:43:58 +0000 (06:43 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Thu, 4 Oct 2007 06:43:58 +0000 (06:43 +0000)
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

Originally committed as revision 10663 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c
libavcodec/h264.h

index 2695002..b1bb071 100644 (file)
@@ -3742,7 +3742,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
         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);
     }
 
index d9a668c..1c9d4e4 100644 (file)
@@ -285,7 +285,7 @@ typedef struct H264Context{
     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;