ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Mon Apr 27 23:51:09 2015 +0200| [0e7444f6e400b16282f6349e3c53bcb72e6e2ad9] | committer: Michael Niedermayer
avcodec/hevc: Remove current_sps The variable should not be needed anymore Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e7444f6e400b16282f6349e3c53bcb72e6e2ad9 --- libavcodec/hevc.c | 9 --------- libavcodec/hevc.h | 2 -- libavcodec/hevc_parser.c | 1 - libavcodec/hevc_ps.c | 7 +------ 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 544854f..f950349 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -3218,8 +3218,6 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) s->pps = NULL; s->vps = NULL; - av_buffer_unref(&s->current_sps); - av_freep(&s->sh.entry_point_offset); av_freep(&s->sh.offset); av_freep(&s->sh.size); @@ -3340,13 +3338,6 @@ static int hevc_update_thread_context(AVCodecContext *dst, } } - av_buffer_unref(&s->current_sps); - if (s0->current_sps) { - s->current_sps = av_buffer_ref(s0->current_sps); - if (!s->current_sps) - return AVERROR(ENOMEM); - } - if (s->sps != s0->sps) if ((ret = set_sps(s, s0->sps, src->pix_fmt)) < 0) return ret; diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index a4f7594..eecccb7 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -819,8 +819,6 @@ typedef struct HEVCContext { AVBufferRef *sps_list[MAX_SPS_COUNT]; AVBufferRef *pps_list[MAX_PPS_COUNT]; - AVBufferRef *current_sps; - AVBufferPool *tab_mvf_pool; AVBufferPool *rpl_tab_pool; diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index 7076897..3c7c3c3 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -333,7 +333,6 @@ static void hevc_close(AVCodecParserContext *s) for (i = 0; i < FF_ARRAY_ELEMS(h->pps_list); i++) av_buffer_unref(&h->pps_list[i]); - av_buffer_unref(&h->current_sps); h->sps = NULL; for (i = 0; i < h->nals_allocated; i++) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 3d4f3e7..de81e01 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -88,12 +88,7 @@ static void remove_sps(HEVCContext *s, int id) if (s->pps_list[i] && ((HEVCPPS*)s->pps_list[i]->data)->sps_id == id) remove_pps(s, i); - if (s->sps_list[id] && s->sps == (HEVCSPS*)s->sps_list[id]->data) { - av_buffer_unref(&s->current_sps); - s->current_sps = av_buffer_ref(s->sps_list[id]); - if (!s->current_sps) - s->sps = NULL; - } + av_assert0(!(s->sps_list[id] && s->sps == (HEVCSPS*)s->sps_list[id]->data)); } av_buffer_unref(&s->sps_list[id]); } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog