aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/vaapi_encode.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-24 23:05:29 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-27 07:20:58 +0100
commit62dc4c2df500e1564a88f75bd402e09e5c205817 (patch)
tree02fb0aca7574e0f98ccb7bc836a209b2529d6457 /doc/examples/vaapi_encode.c
parent89231df48903d6aad6b5c4776f8fc0dbbf2119e8 (diff)
downloadffmpeg-62dc4c2df500e1564a88f75bd402e09e5c205817.tar.gz
avcodec/utils: Only call codec->close if init has been called
avcodec_open2() also called the AVCodec's close function if an error happened before init had ever been called if the AVCodec has the FF_CODEC_CAP_INIT_CLEANUP flag set. This is against the documentation of said flag: "The codec allows calling the close function for deallocation even if the init function returned a failure." E.g. the SVQ3 decoder is not ready to be closed if init has never been called. Fixes: NULL dereference Fixes: 25762/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ3_fuzzer-5716279070294016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 5bc74d06dad35d00b5925b1c76208aeaf40a2dbb)
Diffstat (limited to 'doc/examples/vaapi_encode.c')
0 files changed, 0 insertions, 0 deletions