Skip to content

Instantly share code, notes, and snippets.

View dogenius01's full-sized avatar

Dio dogenius01

  • Korea
View GitHub Profile
@gtgt
gtgt / 00-ffmpeg_random_segment_format.patch
Last active April 2, 2023 10:05
ffmpeg - random filename segment patch (this way you only need to protect the playlist, not the segments)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 17ae300..7ff8c22 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3809,6 +3809,36 @@ uint64_t ff_ntp_time(void)
return (av_gettime() / 1000) * 1000 + NTP_OFFSET_US;
}
+static char *randstring(size_t length) {
+ static char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";