]> git.sesse.net Git - ffmpeg/commit
avcodec/utils: Improve check for freeing codec private options
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 24 Sep 2020 21:41:24 +0000 (23:41 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 1 Oct 2020 11:18:18 +0000 (13:18 +0200)
commitc6e54d14c55221b7380a0e86d7a42b60ff9e5eeb
tree073b234f0df41e03cd445a78f614ce447be6e6bd
parent502c5fe10143247b0566d3d2bb927f49769c2181
avcodec/utils: Improve check for freeing codec private options

Don't check for AVCodec.priv_data_size (which is always true if
AVCodec.priv_class is set). Instead check for AVCodecContext.priv_data
to actually exist.

(Note: av_opt_free(NULL) is a no-op.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/utils.c