Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>2013-05-15 02:37:36 +0400
committerAnton Khirnov <anton@khirnov.net>2013-05-24 10:45:05 +0400
commit3f1a7ceb2c604deff10f475f4b1941458d09d1e7 (patch)
treeaae4c88e9e0e35b5be21732f963ed5712c2000a0 /libavcodec/h264.c
parentb493847df4ff8ce46f258749e4a3f304696b34c1 (diff)
h264_parser: Set field_order and picture_structure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 38e471d998..c53ea13c42 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2642,11 +2642,10 @@ static void flush_dpb(AVCodecContext *avctx)
h->parse_context.last_index = 0;
}
-static int init_poc(H264Context *h)
+int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc)
{
const int max_frame_num = 1 << h->sps.log2_max_frame_num;
int field_poc[2];
- Picture *cur = h->cur_pic_ptr;
h->frame_num_offset = h->prev_frame_num_offset;
if (h->frame_num < h->prev_frame_num)
@@ -2711,10 +2710,11 @@ static int init_poc(H264Context *h)
}
if (h->picture_structure != PICT_BOTTOM_FIELD)
- h->cur_pic_ptr->field_poc[0] = field_poc[0];
+ pic_field_poc[0] = field_poc[0];
if (h->picture_structure != PICT_TOP_FIELD)
- h->cur_pic_ptr->field_poc[1] = field_poc[1];
- cur->poc = FFMIN(cur->field_poc[0], cur->field_poc[1]);
+ pic_field_poc[1] = field_poc[1];
+ if (pic_poc)
+ *pic_poc = FFMIN(pic_field_poc[0], pic_field_poc[1]);
return 0;
}
@@ -3516,7 +3516,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->delta_poc[1] = get_se_golomb(&h->gb);
}
- init_poc(h);
+ ff_init_poc(h, h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc);
if (h->pps.redundant_pic_cnt_present)
h->redundant_pic_count = get_ue_golomb(&h->gb);