1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fftools/ffmpeg_mux: Fix use of uninitialized variable

Broken in a2fc86378a.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-02-25 00:30:42 +01:00
parent ef917950f0
commit 906fc2b2e7

View File

@ -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++;