summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-12-17 13:18:18 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-12-17 13:18:18 +0100
commita7d5b9f1c3ca2e63b0eb882eabadfa1461d17a2d (patch)
tree5e6a5a5085c0540c54263911843114c44c42fc98 /libavcodec/utils.c
parent30833d121e24fc644c9c4e6ca07df3e9e4963180 (diff)
parent84adab333cddeefc3cfd843089dee23f58bd372c (diff)
downloadffmpeg-streaming-a7d5b9f1c3ca2e63b0eb882eabadfa1461d17a2d.zip
ffmpeg-streaming-a7d5b9f1c3ca2e63b0eb882eabadfa1461d17a2d.tar.gz
Merge commit '84adab333cddeefc3cfd843089dee23f58bd372c'
* commit '84adab333cddeefc3cfd843089dee23f58bd372c': lavc: add stream-global packet side data Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 94ec2f6..b039885 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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);
OpenPOWER on IntegriCloud