mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
fate/api-codec-param: fix codec context leak
This commit is contained in:
parent
ff6dd5851b
commit
bd0a9f603d
@ -129,6 +129,12 @@ static int find_video_stream_info(AVFormatContext *fmt_ctx, int decode)
|
||||
end:
|
||||
av_packet_unref(&pkt);
|
||||
|
||||
/* close all codecs opened in try_decode_video_frame */
|
||||
for (i = 0; i < fmt_ctx->nb_streams; i++) {
|
||||
AVStream *st = fmt_ctx->streams[i];
|
||||
avcodec_close(st->codec);
|
||||
}
|
||||
|
||||
return ret < 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user