mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avcodec/options: do a more thorough clean up in avcodec_copy_context()
Free coded_frame to prevent potential leaks. Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit cac8de2da5c4935773128335c11b806faa73e19d)
This commit is contained in:
parent
4122e5fcb3
commit
1c302b606e
@ -182,6 +182,11 @@ void avcodec_free_context(AVCodecContext **pavctx)
|
||||
static void copy_context_reset(AVCodecContext *avctx)
|
||||
{
|
||||
av_opt_free(avctx);
|
||||
#if FF_API_CODED_FRAME
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
av_freep(&avctx->rc_override);
|
||||
av_freep(&avctx->intra_matrix);
|
||||
av_freep(&avctx->inter_matrix);
|
||||
|
Loading…
x
Reference in New Issue
Block a user