History

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

Matthieu Bouron committed 10 years ago

Commit bd0a9f61 parent ff6dd581 file · +6 −0Browse files

Showing the changes to tests/api/api-codec-param-test.c (1 of 1 file). Show all

Unified · Split

tests/api/api-codec-param-test.c+6−0
@@ -129,6 +129,12 @@ static int find_video_stream_info(AVFormatContext *fmt_ctx, int decode) · 128 unmodified lines
129129 end:
130130 av_packet_unref(&pkt);
131131
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+
132138 return ret < 0;
133139 }
134140

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t