History

tests/api/api-dump-stream-meta-test: Fix leaks

Andreas Rheinhardt committed 1 year ago

Commit 62f7b431 parent f4e72eb1 file · +3 −0Browse files

Unified · Split

tests/api/api-dump-stream-meta-test.c+3−0
@@ -67,6 +67,7 @@ static int dump_stream_meta(const char *input_filename) { · 66 unmodified lines
6767 printf("Stream ID: %d, codec name: %s, metadata: %s\n", stream_idx,
6868 avcodec_get_name(origin_par->codec_id),
6969 strlen(metadata) ? metadata : "N/A");
70+ av_free(metadata);
7071
7172 codec = avcodec_find_decoder(origin_par->codec_id);
7273 if (!codec) {
@@ -128,6 +129,7 @@ static int dump_stream_meta(const char *input_filename) { · 55 unmodified lines
128129
129130 printf("Stream ID: %d, new metadata: %s\n", pkt->stream_index,
130131 strlen(metadata) ? metadata : "N/A");
132+ av_free(metadata);
131133
132134 st->event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED;
133135 }
@@ -158,6 +160,7 @@ static int dump_stream_meta(const char *input_filename) { · 24 unmodified lines
158160 printf("Stream ID: %d, frame PTS: %s, metadata: %s\n",
159161 pkt->stream_index, av_ts2str(fr->pts),
160162 strlen(metadata) ? metadata : "N/A");
163+ av_free(metadata);
161164 } while (1);
162165 }
163166

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