mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
avcodec/hevc: keep the active VPS when clearing a layer's SPS
set_sps() with a NULL SPS released s->vps before returning, also when only a non-base layer was cleared while the base layer keeps decoding. The next base-layer frame then dereferenced the NULL VPS in ff_hevc_is_alpha_video(). Release s->vps only when a new SPS is installed alongside it. Assisted-by: Fairy Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
9d106b2bb5
commit
8540c00f1b
@@ -768,6 +768,8 @@ static int set_sps(HEVCContext *s, HEVCLayerContext *l, const HEVCSPS *sps)
|
||||
if (!sps)
|
||||
return 0;
|
||||
|
||||
av_refstruct_unref(&s->vps);
|
||||
|
||||
ret = pic_arrays_init(l, sps);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user