demux_edl: fix signed integer overflow in HLS bitrate

Use the new MP_SATURATE_MUL to prevent hls_bitrate from overflowing when
being multiplied by 8.

Fixes: #18120
This commit is contained in:
Nicolas F authored and Kacper Michajłow committed 2026-06-27 18:10:47 +02:00
1 parent f5a894de87
commit 669f431cf0
1 file changed
+1 -1
+1 -1
View File
@@ -243,7 +243,7 @@ static struct tl_root *parse_edl(bstr str, struct mp_log *log)
: get_meta(tl, index);
sh->lang = get_param0(&ctx, sh, "lang");
sh->title = get_param0(&ctx, sh, "title");
sh->hls_bitrate = get_param_int(&ctx, "byterate", 0) * 8;
MP_SATURATE_MUL(&sh->hls_bitrate, get_param_int(&ctx, "byterate", 0), 8);
int pid = get_param_int(&ctx, "program_id", -1);
if (pid >= 0)
MP_TARRAY_APPEND(sh, sh->program_ids, sh->num_program_ids, pid);