History

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.

James Almer committed 2 years ago

Commit 86e418f1 parent 71669f22 files · +2 −2Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/avcodec.c +2 −0
  2. libavcodec/options.c +0 −2
libavcodec/avcodec.c+2−0
@@ -462,6 +462,8 @@ av_cold void ff_codec_close(AVCodecContext *avctx) · 461 unmodified lines
462462 av_freep(&avctx->coded_side_data[i].data);
463463 av_freep(&avctx->coded_side_data);
464464 avctx->nb_coded_side_data = 0;
465+ av_frame_side_data_free(&avctx->decoded_side_data,
466+ &avctx->nb_decoded_side_data);
465467
466468 av_buffer_unref(&avctx->hw_frames_ctx);
467469 av_buffer_unref(&avctx->hw_device_ctx);
libavcodec/options.c+0−2
@@ -177,8 +177,6 @@ void avcodec_free_context(AVCodecContext **pavctx) · 176 unmodified lines
177177 av_freep(&avctx->inter_matrix);
178178 av_freep(&avctx->rc_override);
179179 av_channel_layout_uninit(&avctx->ch_layout);
180− av_frame_side_data_free(
181− &avctx->decoded_side_data, &avctx->nb_decoded_side_data);
182180
183181 av_freep(pavctx);
184182 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t