aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-02-25 00:30:42 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-02-25 13:41:56 +0100
commit906fc2b2e77d9840d0738f717d4b693f2accc51c (patch)
tree1630b5471d46bf2864b815b4522c5c4cb7105210
parentef917950f0298a812bebfed2443626972a7d8f29 (diff)
downloadffmpeg-906fc2b2e77d9840d0738f717d4b693f2accc51c.tar.gz
fftools/ffmpeg_mux: Fix use of uninitialized variable
Broken in a2fc86378a18b2c2966ce3438df8f27f646438e5. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--fftools/ffmpeg_mux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 2c01aec665..335b8b42ca 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -506,14 +506,14 @@ int print_sdp(const char *filename);
int print_sdp(const char *filename)
{
char sdp[16384];
- int j, ret;
+ int j = 0, ret;
AVIOContext *sdp_pb;
AVFormatContext **avc;
avc = av_malloc_array(nb_output_files, sizeof(*avc));
if (!avc)
return AVERROR(ENOMEM);
- for (int i = 0, j = 0; i < nb_output_files; i++) {
+ for (int i = 0; i < nb_output_files; i++) {
if (!strcmp(output_files[i]->format->name, "rtp")) {
avc[j] = mux_from_of(output_files[i])->fc;
j++;