1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00
FFmpeg/libavformat
Vignesh Ravichandran 45a673ebee avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist
fix ticket: 8989

This is is due to the following behavior in the current code:
1. The initial_prog_date_time gets set to the current local time
2. The existing playlist (.m3u8) file gets parsed and the segments
   present are added to the variant stream
3. The new segment is created and added
4. The existing segments and the new segment are written to the
   playlist file. The initial_prog_date_time from point 1 is used
   for calculating "#EXT-X-PROGRAM-DATE-TIME" for the segments,
   which results in incorrect "#EXT-X-PROGRAM-DATE-TIME" values
   for existing segments
The following approach fixes this bug:
1. Add a new variable "discont_program_date_time" of type double
   to HLSSegment struct
2. Store the "EXT-X-PROGRAM-DATE-TIME" value from the existing
   segments in this variable
3. When writing to playlist file if "discont_program_date_time"
   is set, then use that value for "EXT-X-PROGRAM-DATE-TIME" else
   use the value present in vs->initial_prog_date_time

Signed-off-by: Vignesh Ravichandran <vignesh.ravichandran02@gmail.com>
Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2020-12-08 20:57:24 +08:00
..
2020-10-03 21:50:59 +02:00
2020-11-04 23:30:53 +01:00
2020-10-25 23:44:26 +10:00
2020-11-09 14:58:38 +10:00
2020-10-06 00:01:35 +08:00
2020-10-06 00:01:27 +08:00
2020-11-11 17:05:24 +01:00
2020-10-24 19:11:12 +02:00
2020-11-04 23:30:53 +01:00
2020-11-21 22:09:51 +01:00
2020-10-07 22:16:09 +02:00
2020-09-24 13:38:28 +02:00
2020-10-25 09:49:26 +01:00
2020-09-18 11:30:03 +02:00
2020-06-18 21:31:13 +02:00
2020-09-03 18:11:00 +02:00
2020-11-22 17:45:17 +01:00
2020-09-03 18:03:18 +02:00
2020-10-24 19:11:12 +02:00
2020-10-25 09:49:31 +01:00
2020-06-06 00:25:00 +02:00
2020-06-06 00:25:00 +02:00
2020-09-13 16:05:01 +02:00
2020-06-13 00:43:09 +02:00
2020-10-22 20:53:57 +08:00
2020-12-05 00:08:33 +01:00
2020-07-26 16:47:01 +02:00
2020-10-21 17:21:41 +02:00