[FFmpeg-devel] [PATCH] avformat/hlsenc: compiler warning fix

Bodecs Bela bodecsb at vivanet.hu
Mon Jan 20 09:34:58 EET 2020


Dear All,

This patch corrects compiler warning about returning possibly uninitialized
variable in hls_write_header function.

please review this patch!

Thank you in advance.

Bela


-------------- next part --------------
>From e7b3a680f13fd6113f3bf118803d9609d0fe8bda Mon Sep 17 00:00:00 2001
From: Bela Bodecs <bodecsb at vivanet.hu>
Date: Mon, 20 Jan 2020 08:31:38 +0100
Subject: [PATCH] avformat/hlsenc: compiler warning fix

Correcting compiler warning about returning possibly uninitialized
variable in hls_write_header function.


Signed-off-by: Bela Bodecs <bodecsb at vivanet.hu>
---
 libavformat/hlsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index d130f03ea62..1661f7aacba 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2170,7 +2170,7 @@ fail:
 static int hls_write_header(AVFormatContext *s)
 {
     HLSContext *hls = s->priv_data;
-    int ret, i, j;
+    int ret = 0, i, j;
     VariantStream *vs = NULL;
 
     for (i = 0; i < hls->nb_varstreams; i++) {
-- 
2.20.1.windows.1



More information about the ffmpeg-devel mailing list