diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-05-17 19:00:18 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-06-21 11:10:29 +0200 |
commit | bcd91f1644b46dd142c5355c8b742b27d9028903 (patch) | |
tree | 68fcef899cedc48eef758205848e272b8953bb07 /libavcodec | |
parent | 17e7c03e12d1e4490921e7bffaeaa6b46a7ada4e (diff) | |
download | ffmpeg-bcd91f1644b46dd142c5355c8b742b27d9028903.tar.gz |
h264: move a per-field block from decode_slice_header() to field_start()
This is a more appropriate place for it.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_slice.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 990c85bdba..ec8a82c0a6 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1167,6 +1167,13 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, release_unused_pictures(h, 0); } + ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc, + h->ps.sps, &h->poc, h->picture_structure, nal->ref_idc); + + memcpy(h->mmco, sl->mmco, sl->nb_mmco * sizeof(*h->mmco)); + h->nb_mmco = sl->nb_mmco; + h->explicit_ref_marking = sl->explicit_ref_marking; + return 0; } @@ -1437,15 +1444,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl, sl->resync_mb_y = sl->mb_y = sl->mb_y + 1; assert(sl->mb_y < h->mb_height); - 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, nal->ref_idc); - - memcpy(h->mmco, sl->mmco, sl->nb_mmco * sizeof(*h->mmco)); - h->nb_mmco = sl->nb_mmco; - h->explicit_ref_marking = sl->explicit_ref_marking; - } - ret = ff_h264_build_ref_list(h, sl); if (ret < 0) return ret; |