Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartatz committed Jan 25, 2025
1 parent 45a5a4f commit 0e3b946
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ add_executable(
src/m3u8.c
src/m3u8utils.c
src/fstream.c
src/readlines.c
src/strsplit.c
src/terminal.c
src/ffmpeg_muxer.c
src/ffmpegc_muxer.c
Expand Down
5 changes: 4 additions & 1 deletion src/fstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ On Linux: available when defined(_LARGEFILE64_SOURCE) or _POSIX_C_SOURCE >= 2001
On Apple, Android, Haiku and SerenityOS: available by default
On FreeBSD and DragonFly BSD: available when __POSIX_VISIBLE >= 200112 or __XSI_VISIBLE >= 500
On NetBSD: available when __POSIX_VISIBLE >= 200112 or __XSI_VISIBLE >= 500 or defined(_NETBSD_SOURCE)
*/
#if ((defined(__linux__) && (defined(_LARGEFILE64_SOURCE) || defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)) || defined(__HAIKU__) || defined(__serenity__) || \
((defined(__FreeBSD__) || defined(__DragonFly__)) && (__POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500)) || \
Expand All @@ -35,6 +34,10 @@ On NetBSD: available when __POSIX_VISIBLE >= 200112 or __XSI_VISIBLE >= 500 or d
#define HAVE_FSEEKO 1
#define HAVE_FTELLO 1
#endif
*/

#define HAVE_FSEEKO 1
#define HAVE_FTELLO 1

struct FStream* fstream_open(const char* const filename, const enum FStreamMode mode) {
/*
Expand Down
29 changes: 15 additions & 14 deletions src/m3u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,34 @@ static const enum M3U8VItemType M3U8_VITEM_TYPES[] = {
#define M3U8TAG_SETVAL_ITEMS 3

/*
The M3U8 specification does not specify a maximum limit for line lengths,
but a hard limit of 10240 (10 KiB) is set here.
Max limit for line lengths.
*/
#define M3U8_MAX_LINE_LEN (1024 * 10)
#define M3U8_MAX_LINE_LEN (1024 * 10) /* 10 KiB */

/*
The M3U8 specification does not specify a maximum limit for attribute values,
but a hard limit of 5120 (5 KiB) is set here.
Max length limit for attribute values.
*/
#define M3U8_MAX_ATTR_VALUE_LEN (1024 * 5)
#define M3U8_MAX_ATTR_VALUE_LEN (1024 * 5) /* 5 KiB */

/*
The M3U8 specification does not specify a maximum limit for attribute names,
but a hard limit of 50 is set here.
Max length limit for attribute names.
*/
#define M3U8_MAX_ATTR_NAME_LEN (50 * 1)
#define M3U8_MAX_ATTR_NAME_LEN (50 * 1) /* 50 */

/*
The longest M3U8 tag name is 'EXT-X-DISCONTINUITY-SEQUENCE', which contains
28 characters.
Max length limit for tag names.
*/
#define M3U8_MAX_TAG_NAME_LEN (28 + 1)
#define M3U8_MAX_TAG_NAME_LEN (28 + 1) /* 28 */

/*
Max length limit for item values.
*/
#define M3U8_MAX_ITEM_VALUE_LEN (128 * 5)

#define M3U8_MAX_PLAYLIST_LEN ((1024 * 1024 * 16) + 1)
/*
Maximum length limit for M3U8 playlists.
*/
#define M3U8_MAX_PLAYLIST_LEN ((1024 * 1024 * 16) + 1) /* 16 MiB */

#define M3U8_PLAYLIST_TAG 1
#define M3U8_PLAYLIST_COMMENT 2
Expand Down Expand Up @@ -167,7 +169,6 @@ static const char M3U8K_LAST_PART[] = "LAST-PART";
static const char M3U8K_STABLE_RENDITION_ID[] = "STABLE-RENDITION-ID";
static const char M3U8K_BIT_DEPTH[] = "BIT-DEPTH";
static const char M3U8K_SAMPLE_RATE[] = "SAMPLE-RATE";

static const char M3U8K_SCORE[] = "SCORE";
static const char M3U8K_SUPPLEMENTAL_CODECS[] = "SUPPLEMENTAL-CODECS";
static const char M3U8K_ALLOWED_CPC[] = "ALLOWED-CPC";
Expand Down

0 comments on commit 0e3b946

Please sign in to comment.