|
|
|
@ -2507,12 +2507,13 @@ void avsubtitle_free(AVSubtitle *sub) |
|
|
|
|
|
|
|
|
|
av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
|
{ |
|
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
if (!avctx) |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
if (avcodec_is_open(avctx)) { |
|
|
|
|
FramePool *pool = avctx->internal->pool; |
|
|
|
|
int i; |
|
|
|
|
if (CONFIG_FRAME_THREAD_ENCODER && |
|
|
|
|
avctx->internal->frame_thread_encoder && avctx->thread_count > 1) { |
|
|
|
|
ff_frame_thread_encoder_free(avctx); |
|
|
|
@ -2535,6 +2536,11 @@ av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
|
av_freep(&avctx->internal); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (i = 0; i < avctx->nb_coded_side_data; i++) |
|
|
|
|
av_freep(&avctx->coded_side_data[i].data); |
|
|
|
|
av_freep(&avctx->coded_side_data); |
|
|
|
|
avctx->nb_coded_side_data = 0; |
|
|
|
|
|
|
|
|
|
if (avctx->priv_data && avctx->codec && avctx->codec->priv_class) |
|
|
|
|
av_opt_free(avctx->priv_data); |
|
|
|
|
av_opt_free(avctx); |
|
|
|
|