Showing the changes to tests/api/api-codec-param-test.c (1 of 1 file). Show all
Unified · Split
| @@ -129,6 +129,12 @@ static int find_video_stream_info(AVFormatContext *fmt_ctx, int decode) · 128 unmodified lines | ||
| 129 | 129 | end: |
| 130 | 130 | av_packet_unref(&pkt); |
| 131 | 131 | |
| 132 | + /* close all codecs opened in try_decode_video_frame */ | |
| 133 | + for (i = 0; i < fmt_ctx->nb_streams; i++) { | |
| 134 | + AVStream *st = fmt_ctx->streams[i]; | |
| 135 | + avcodec_close(st->codec); | |
| 136 | + } | |
| 137 | + | |
| 132 | 138 | return ret < 0; |
| 133 | 139 | } |
| 134 | 140 | |