aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/psymodel.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-02-10 14:26:59 -0300
committerJames Almer <jamrial@gmail.com>2021-02-11 13:15:45 -0300
commit089706e009240ce3dc76f09ae9eee0ba98e65bd1 (patch)
treeab6d236cbe6b09f9872f5fb702712744ec22e7ea /libavcodec/psymodel.c
parent44facfb845563b3fc2a12cc3fbefc86ea72dea0b (diff)
downloadffmpeg-089706e009240ce3dc76f09ae9eee0ba98e65bd1.tar.gz
avcodec/hevcdec: check that the local context list was allocated before dereferencing it
Since the decoder is not flagged as init cleanup capable, hevc_decode_free() is being called manually if the hevc_decode_extradata() call fails at the end of hevc_decode_init(). In a frame threading scenario, however, if AVCodec->init() returns an error, ff_frame_thread_free() will be called regardless of the above flag being set or not, resulting in hevc_decode_free() being called a second time for the same context. Workaround this by ensuring pointers are not dereferenced if they are NULL, and set the decoder as init cleanup capable while at it. Fixes ticket #9099. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/psymodel.c')
0 files changed, 0 insertions, 0 deletions