[FFmpeg-cvslog] avformat/dashenc, hlsenc: Return 0 on succes from write_header
Andreas Rheinhardt
git at videolan.org
Tue Mar 5 16:18:09 EET 2024
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Mar 5 11:15:36 2024 +0100| [440f8186ef9baf3f581fc463f318014d3176c4cd] | committer: Andreas Rheinhardt
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 at chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=440f8186ef9baf3f581fc463f318014d3176c4cd
---
libavformat/dashenc.c | 2 +-
libavformat/hlsenc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 435a5e8afe..5e31b09486 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -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,
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index d5cd627e59..e560aa6a20 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -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)
More information about the ffmpeg-cvslog
mailing list