Skip to content

Commit

Permalink
fix: HLS MP4 seek
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmercerind authored Aug 23, 2023
1 parent 6c844ea commit acbe763
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions buildscripts/patches/ffmpeg/hls_mp4_seek.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 2a2fe28a540f..c625e3029116 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2506,6 +2506,9 @@ static int hls_read_seek(AVFormatContext *s, int stream_index,
/* Flush the packet queue of the subdemuxer. */
ff_read_frame_flush(pls->ctx);

+ /* Reset the init segment so it's re-fetched and served appropiately */
+ pls->cur_init_section = NULL;
+
pls->seek_timestamp = seek_timestamp;
pls->seek_flags = flags;

0 comments on commit acbe763

Please sign in to comment.