|
|
@ -1603,9 +1603,11 @@ void avsubtitle_free(AVSubtitle *sub) |
|
|
|
|
|
|
|
|
|
|
|
av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
if (avcodec_is_open(avctx)) { |
|
|
|
if (avcodec_is_open(avctx)) { |
|
|
|
FramePool *pool = avctx->internal->pool; |
|
|
|
FramePool *pool = avctx->internal->pool; |
|
|
|
int i; |
|
|
|
|
|
|
|
if (HAVE_THREADS && avctx->internal->thread_ctx) |
|
|
|
if (HAVE_THREADS && avctx->internal->thread_ctx) |
|
|
|
ff_thread_free(avctx); |
|
|
|
ff_thread_free(avctx); |
|
|
|
if (avctx->codec && avctx->codec->close) |
|
|
|
if (avctx->codec && avctx->codec->close) |
|
|
@ -1622,6 +1624,11 @@ av_cold int avcodec_close(AVCodecContext *avctx) |
|
|
|
av_freep(&avctx->internal); |
|
|
|
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) |
|
|
|
if (avctx->priv_data && avctx->codec && avctx->codec->priv_class) |
|
|
|
av_opt_free(avctx->priv_data); |
|
|
|
av_opt_free(avctx->priv_data); |
|
|
|
av_opt_free(avctx); |
|
|
|
av_opt_free(avctx); |
|
|
|