mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-27 20:01:50 +02:00
avcodec/hevc: more clearing to avoid stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ccd6911c18
commit
1db641cbd2
@ -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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user