]> git.sesse.net Git - ffmpeg/blobdiff - tests/api/api-codec-param-test.c
Merge commit 'f0b769c16daafa64720dcba7fa81a9f5255e1d29'
[ffmpeg] / tests / api / api-codec-param-test.c
index 9989825895af3f3d7a6caf6ccddae777a0c62762..fa51964bbda91e23575202d7bc191058c44e9ec5 100644 (file)
@@ -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;
 }