diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-11-30 22:52:36 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-12-06 09:43:45 +0100 |
commit | 792b9c9dfcf44b657d7854368d975b5ca3bc22ca (patch) | |
tree | 388c6b5f9024ce1e6f771202e32105d13cfeecca /libavcodec/h264_slice.c | |
parent | 741b494fa8cd28a7d096349bac183893c236e3f9 (diff) | |
download | ffmpeg-792b9c9dfcf44b657d7854368d975b5ca3bc22ca.tar.gz |
h264: set frame_num in start_frame(), not decode_slice_header()
That is a more appropriate place for it, since it is not allowed to
change between slices.
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4c825887a6..4f2d6a895b 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -553,6 +553,7 @@ static int h264_frame_start(H264Context *h) pic->reference = h->droppable ? 0 : h->picture_structure; pic->f->coded_picture_number = h->coded_picture_number++; pic->field_picture = h->picture_structure != PICT_FRAME; + pic->frame_num = h->frame_num; /* * Zero key_frame here; IDR markings per slice in frame or fields are ORed * in later. @@ -1418,9 +1419,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) } } - if (!h->setup_finished) - h->cur_pic_ptr->frame_num = h->frame_num; // FIXME frame_num cleanup - assert(h->mb_num == h->mb_width * h->mb_height); if (first_mb_in_slice << FIELD_OR_MBAFF_PICTURE(h) >= h->mb_num || first_mb_in_slice >= h->mb_num) { |