avformat/hlsenc: initialize avg_bandwidth

Fixes use of uninitialized value and dumping it into AVERAGE-BANDWIDTH
in playlist. Note this will be correctly set when we are at final
segment, otherwise it's optional.

Fixes: fate-hls-seek test on MSAN build

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow committed 2026-06-24 02:04:02 +00:00
1 parent a02dfb1262
commit dc953a19e6
1 file changed
+1
+1
View File
@@ -1472,6 +1472,7 @@ static int create_master_playlist(AVFormatContext *s,
avg_bandwidth = vs->avg_bitrate;
} else {
bandwidth = 0;
avg_bandwidth = 0;
if (vid_st)
bandwidth += get_stream_bit_rate(vid_st);
if (aud_st)