1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avformat/dashenc, hlsenc: Return 0 on succes from write_header

Do not propagate the return value of avformat_write_header(),
as it contains the information whether the output had
already been initialized in avformat_init_output(),
but this is set generically; the return value of
FFOutputFormat.write_header is not documented at all
(and is currently ignored if >= 0), but it is more future-proof
to simply return 0 on success.

Reviewed-by: Liu Steven <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-03-05 11:15:36 +01:00
parent d085f341d6
commit 440f8186ef
2 changed files with 2 additions and 2 deletions

View File

@ -1747,7 +1747,7 @@ static int dash_write_header(AVFormatContext *s)
(ret = flush_init_segment(s, os)) < 0)
return ret;
}
return ret;
return 0;
}
static int add_segment(OutputStream *os, const char *file,

View File

@ -2372,7 +2372,7 @@ static int hls_write_header(AVFormatContext *s)
}
}
return ret;
return 0;
}
static int hls_init_file_resend(AVFormatContext *s, VariantStream *vs)