diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-04-14 20:53:59 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-06-12 20:27:52 +0200 |
commit | 4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960 (patch) | |
tree | b07972a7cc21f9a33b8811bc3ddb470208621eb1 | |
parent | 6dd996c7c81575a1e4969987ab175a6df7beab3d (diff) | |
download | ffmpeg-4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960.tar.gz |
h264: move calculating the POC out of h264_slice_header_parse()
This function does not do any bitstream parsing and it depends on the
current frame being allocated, so this will allow the frame_start() to
be moved out eventually.
-rw-r--r-- | libavcodec/h264_slice.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 0c38121827..3252b38ff5 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1325,10 +1325,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl) } } - if (!h->setup_finished) - ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc, - sps, &h->poc, h->picture_structure, h->nal_ref_idc); - if (pps->redundant_pic_cnt_present) sl->redundant_pic_count = get_ue_golomb(&sl->gb); @@ -1446,6 +1442,10 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) if (ret < 0) return ret; + if (!h->setup_finished) + ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc, + h->ps.sps, &h->poc, h->picture_structure, h->nal_ref_idc); + ret = ff_h264_build_ref_list(h, sl); if (ret < 0) return ret; |