ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Mon Apr 11 16:32:02 2016 +0200| [370ddc7b38d6b27b54fc2f5ee5f3dd9506f8c7c8] | committer: Anton Khirnov
h264: remove H264Context.pict_type It is not used for anything internally, just exported in the output frames. So remove the indirection and set it directly in frame_start(). > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=370ddc7b38d6b27b54fc2f5ee5f3dd9506f8c7c8 --- libavcodec/h264.c | 2 -- libavcodec/h264.h | 2 -- libavcodec/h264_slice.c | 6 ++---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9cc0a24..c024d7e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -438,8 +438,6 @@ static void decode_postinit(H264Context *h, int setup_finished) int i, pics, out_of_order, out_idx; int invalid = 0, cnt = 0; - h->cur_pic_ptr->f->pict_type = h->pict_type; - if (h->next_output_pic) return; diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 3dc7d66..daad1be 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -597,8 +597,6 @@ typedef struct H264Context { */ int single_decode_warning; - enum AVPictureType pict_type; - /** @} */ /** diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index ee4b74a..9e08c0b 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -467,6 +467,8 @@ static int h264_frame_start(H264Context *h) pic->mmco_reset = 0; pic->recovered = 0; + pic->f->pict_type = h->slice_ctx[0].slice_type; + if (CONFIG_ERROR_RESILIENCE && h->enable_er) ff_er_frame_start(&h->slice_ctx[0].er); @@ -974,10 +976,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) return AVERROR_INVALIDDATA; } - // to make a few old functions happy, it's wrong though - if (!h->setup_finished) - h->pict_type = sl->slice_type; - pps_id = get_ue_golomb(&sl->gb); if (pps_id >= MAX_PPS_COUNT) { av_log(h->avctx, AV_LOG_ERROR, "pps_id %u out of range\n", pps_id); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog