Commit 0e7444f6 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevc: Remove current_sps

The variable should not be needed anymore
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2879a4ec
...@@ -3218,8 +3218,6 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) ...@@ -3218,8 +3218,6 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx)
s->pps = NULL; s->pps = NULL;
s->vps = NULL; s->vps = NULL;
av_buffer_unref(&s->current_sps);
av_freep(&s->sh.entry_point_offset); av_freep(&s->sh.entry_point_offset);
av_freep(&s->sh.offset); av_freep(&s->sh.offset);
av_freep(&s->sh.size); av_freep(&s->sh.size);
...@@ -3340,13 +3338,6 @@ static int hevc_update_thread_context(AVCodecContext *dst, ...@@ -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 (s->sps != s0->sps)
if ((ret = set_sps(s, s0->sps, src->pix_fmt)) < 0) if ((ret = set_sps(s, s0->sps, src->pix_fmt)) < 0)
return ret; return ret;
......
...@@ -819,8 +819,6 @@ typedef struct HEVCContext { ...@@ -819,8 +819,6 @@ typedef struct HEVCContext {
AVBufferRef *sps_list[MAX_SPS_COUNT]; AVBufferRef *sps_list[MAX_SPS_COUNT];
AVBufferRef *pps_list[MAX_PPS_COUNT]; AVBufferRef *pps_list[MAX_PPS_COUNT];
AVBufferRef *current_sps;
AVBufferPool *tab_mvf_pool; AVBufferPool *tab_mvf_pool;
AVBufferPool *rpl_tab_pool; AVBufferPool *rpl_tab_pool;
......
...@@ -333,7 +333,6 @@ static void hevc_close(AVCodecParserContext *s) ...@@ -333,7 +333,6 @@ static void hevc_close(AVCodecParserContext *s)
for (i = 0; i < FF_ARRAY_ELEMS(h->pps_list); i++) for (i = 0; i < FF_ARRAY_ELEMS(h->pps_list); i++)
av_buffer_unref(&h->pps_list[i]); av_buffer_unref(&h->pps_list[i]);
av_buffer_unref(&h->current_sps);
h->sps = NULL; h->sps = NULL;
for (i = 0; i < h->nals_allocated; i++) for (i = 0; i < h->nals_allocated; i++)
......
...@@ -88,12 +88,7 @@ static void remove_sps(HEVCContext *s, int id) ...@@ -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) if (s->pps_list[i] && ((HEVCPPS*)s->pps_list[i]->data)->sps_id == id)
remove_pps(s, i); remove_pps(s, i);
if (s->sps_list[id] && s->sps == (HEVCSPS*)s->sps_list[id]->data) { av_assert0(!(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_buffer_unref(&s->sps_list[id]); av_buffer_unref(&s->sps_list[id]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment