1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

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
2026-06-24 03:32:54 +02:00
parent a02dfb1262
commit dc953a19e6

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)