aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-12 06:36:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-12 21:03:09 +0200
commitccd6911c189d2f974dcc4095c963dfad14d703d2 (patch)
treeaf9581f567817be451c6a4fd8b4618c77f6c77d5 /libavcodec/hevc_parser.c
parent52fafaf4740b78174e9da0d2aaaf3dd93ab33d63 (diff)
downloadffmpeg-ccd6911c189d2f974dcc4095c963dfad14d703d2.tar.gz
avcodec/hevc_ps: do not loose all reference to pointers still in use
Fixes leaving a pointer to unreferenced memory Fixes Ticket 3115 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_parser.c')
-rw-r--r--libavcodec/hevc_parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index 96dbb59308..834b93b9e9 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -331,6 +331,9 @@ 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++)
av_freep(&h->nals[i].rbsp_buffer);
av_freep(&h->nals);