Commit bd0a9f60 authored by Matthieu Bouron's avatar Matthieu Bouron

fate/api-codec-param: fix codec context leak

parent ff6dd585
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment