aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-27 23:51:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-28 00:04:58 +0200
commit0e7444f6e400b16282f6349e3c53bcb72e6e2ad9 (patch)
tree2ae35e1ed2e9659ff56611ac9b705f7ce80944d1 /libavcodec
parent2879a4ecb9c31430dae75af79696ef4f94ce6b46 (diff)
downloadffmpeg-0e7444f6e400b16282f6349e3c53bcb72e6e2ad9.tar.gz
avcodec/hevc: Remove current_sps
The variable should not be needed anymore Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevc.c9
-rw-r--r--libavcodec/hevc.h2
-rw-r--r--libavcodec/hevc_parser.c1
-rw-r--r--libavcodec/hevc_ps.c7
4 files changed, 1 insertions, 18 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 544854ffc4..f95034941a 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 a4f7594d2c..eecccb7f16 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 70768976b6..3c7c3c377d 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 3d4f3e7ffb..de81e011f0 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]);
}