Skip to content

Commit acbe763

Browse files
fix: HLS MP4 seek
media-kit/media-kit#395
1 parent 6c844ea commit acbe763

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/libavformat/hls.c b/libavformat/hls.c
2+
index 2a2fe28a540f..c625e3029116 100644
3+
--- a/libavformat/hls.c
4+
+++ b/libavformat/hls.c
5+
@@ -2506,6 +2506,9 @@ static int hls_read_seek(AVFormatContext *s, int stream_index,
6+
/* Flush the packet queue of the subdemuxer. */
7+
ff_read_frame_flush(pls->ctx);
8+
9+
+ /* Reset the init segment so it's re-fetched and served appropiately */
10+
+ pls->cur_init_section = NULL;
11+
+
12+
pls->seek_timestamp = seek_timestamp;
13+
pls->seek_flags = flags;
14+

0 commit comments

Comments
 (0)