diff options
author | Matthieu Bouron <matthieu.bouron@stupeflix.com> | 2015-12-07 10:00:35 +0100 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@stupeflix.com> | 2015-12-08 08:12:35 +0100 |
commit | bd0a9f603d0c1d0f3be782865f72ac29ab89bc5b (patch) | |
tree | 263ee75edd39214180da15fed72aee5eff10fb22 | |
parent | ff6dd5851bffe9518f2e814a2f4892f0aa4fd6f9 (diff) | |
download | ffmpeg-bd0a9f603d0c1d0f3be782865f72ac29ab89bc5b.tar.gz |
fate/api-codec-param: fix codec context leak
-rw-r--r-- | tests/api/api-codec-param-test.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/api/api-codec-param-test.c b/tests/api/api-codec-param-test.c index 9989825895..fa51964bbd 100644 --- a/tests/api/api-codec-param-test.c +++ b/tests/api/api-codec-param-test.c @@ -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; } |