summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264.c2
-rw-r--r--libavcodec/h264.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 26950022a8..b1bb071244 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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);
}
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index d9a668c7b1..1c9d4e4c1e 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -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;