From: leizhai <[email protected]>
---
libavformat/hls.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 0611ddc6bb..4525862ee8 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2237,7 +2237,12 @@ static int hls_read_seek(AVFormatContext *s, int
stream_index,
}
/* check if the timestamp is valid for the playlist with the
* specified stream index */
- if (!seek_pls || !find_timestamp_in_playlist(c, seek_pls, seek_timestamp,
&seq_no))
+
+ /*fix seek to first_timestamp return error bug*/
+ int find_ts_ret = find_timestamp_in_playlist(c, seek_pls, seek_timestamp,
&seq_no);
+ if (find_ts_ret == 0 && seq_no == seek_pls->start_seq_no)
+ find_ts_ret = 1;
+ if (!seek_pls || !find_ts_ret)
return AVERROR(EIO);
/* set segment now so we do not need to search again below */
--
2.14.3 (Apple Git-98)
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".