mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
avformat/hlsenc: Fix overflow of int for durations compute
Fix ticket: 8037 Reported-by: DusanBrejka Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
43891ea8ab
commit
23678462c0
@ -2301,8 +2301,8 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
|
|
||||||
if (vs->sequence - vs->nb_entries > hls->start_sequence && hls->init_time > 0) {
|
if (vs->sequence - vs->nb_entries > hls->start_sequence && hls->init_time > 0) {
|
||||||
/* reset end_pts, hls->recording_time at end of the init hls list */
|
/* reset end_pts, hls->recording_time at end of the init hls list */
|
||||||
int init_list_dur = hls->init_time * vs->nb_entries * AV_TIME_BASE;
|
int64_t init_list_dur = hls->init_time * vs->nb_entries * AV_TIME_BASE;
|
||||||
int after_init_list_dur = (vs->sequence - hls->start_sequence - vs->nb_entries ) * (hls->time * AV_TIME_BASE);
|
int64_t after_init_list_dur = (vs->sequence - hls->start_sequence - vs->nb_entries ) * (hls->time * AV_TIME_BASE);
|
||||||
hls->recording_time = hls->time * AV_TIME_BASE;
|
hls->recording_time = hls->time * AV_TIME_BASE;
|
||||||
end_pts = init_list_dur + after_init_list_dur ;
|
end_pts = init_list_dur + after_init_list_dur ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user