You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
avcodec/avcodec: free decoded_side_data in ff_codec_close()
It's set by the library when decoding, so it should be freed when closing the context. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -462,6 +462,8 @@ av_cold void ff_codec_close(AVCodecContext *avctx)
|
|||||||
av_freep(&avctx->coded_side_data[i].data);
|
av_freep(&avctx->coded_side_data[i].data);
|
||||||
av_freep(&avctx->coded_side_data);
|
av_freep(&avctx->coded_side_data);
|
||||||
avctx->nb_coded_side_data = 0;
|
avctx->nb_coded_side_data = 0;
|
||||||
|
av_frame_side_data_free(&avctx->decoded_side_data,
|
||||||
|
&avctx->nb_decoded_side_data);
|
||||||
|
|
||||||
av_buffer_unref(&avctx->hw_frames_ctx);
|
av_buffer_unref(&avctx->hw_frames_ctx);
|
||||||
av_buffer_unref(&avctx->hw_device_ctx);
|
av_buffer_unref(&avctx->hw_device_ctx);
|
||||||
|
@@ -177,8 +177,6 @@ void avcodec_free_context(AVCodecContext **pavctx)
|
|||||||
av_freep(&avctx->inter_matrix);
|
av_freep(&avctx->inter_matrix);
|
||||||
av_freep(&avctx->rc_override);
|
av_freep(&avctx->rc_override);
|
||||||
av_channel_layout_uninit(&avctx->ch_layout);
|
av_channel_layout_uninit(&avctx->ch_layout);
|
||||||
av_frame_side_data_free(
|
|
||||||
&avctx->decoded_side_data, &avctx->nb_decoded_side_data);
|
|
||||||
|
|
||||||
av_freep(pavctx);
|
av_freep(pavctx);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user