diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-12 06:50:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-12 21:31:37 +0200 |
commit | 1db641cbd2170808dc1de81e86bee1900e5dd65c (patch) | |
tree | bc15bb9c2872f3be6c1a55f3aa1e703ff9f795e5 | |
parent | ccd6911c189d2f974dcc4095c963dfad14d703d2 (diff) | |
download | ffmpeg-1db641cbd2170808dc1de81e86bee1900e5dd65c.tar.gz |
avcodec/hevc: more clearing to avoid stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/hevc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 2cdd08a7de..cc36f97782 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2965,6 +2965,9 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) av_buffer_unref(&s->sps_list[i]); for (i = 0; i < FF_ARRAY_ELEMS(s->pps_list); i++) av_buffer_unref(&s->pps_list[i]); + s->sps = NULL; + s->pps = NULL; + s->vps = NULL; av_buffer_unref(&s->current_sps); @@ -3063,6 +3066,8 @@ static int hevc_update_thread_context(AVCodecContext *dst, } } + if (s->sps != s0->sps) + s->sps = NULL; for (i = 0; i < FF_ARRAY_ELEMS(s->vps_list); i++) { av_buffer_unref(&s->vps_list[i]); if (s0->vps_list[i]) { |