# HG changeset patch # User michael # Date 1087248636 0 # Node ID ac85aafd0971d9c7620165c74eece181a1bcf4a9 # Parent 3fc285cdb7914d2c3e07fd613c61a7d8263962cd file id string max short startcode distance diff -r 3fc285cdb791 -r ac85aafd0971 nut.c --- a/nut.c Fri Jun 11 22:03:16 2004 +0000 +++ b/nut.c Mon Jun 14 21:30:36 2004 +0000 @@ -49,6 +49,8 @@ #define INDEX_STARTCODE (0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48)) #define INFO_STARTCODE (0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48)) +#define ID_STRING "nut/multimedia container\0" + #define MAX_DISTANCE (1024*16-1) #define MAX_SHORT_DISTANCE (1024*4-1) @@ -84,6 +86,7 @@ uint64_t next_startcode; ///< stores the next startcode if it has alraedy been parsed but the stream isnt seekable StreamContext *stream; int max_distance; + int max_short_distance; int rate_num; int rate_den; int short_startcode; @@ -510,6 +513,11 @@ nut->stream = av_mallocz(sizeof(StreamContext)*s->nb_streams); + + + put_buffer(bc, ID_STRING, strlen(ID_STRING)); + put_byte(bc, 0); + nut->packet_start[2]= url_ftell(bc); /* main header */ put_be64(bc, MAIN_STARTCODE); @@ -517,6 +525,7 @@ put_v(bc, 2); /* version */ put_v(bc, s->nb_streams); put_v(bc, MAX_DISTANCE); + put_v(bc, MAX_SHORT_DISTANCE); put_v(bc, nut->rate_num=1); put_v(bc, nut->rate_den=2); @@ -869,6 +878,7 @@ nut->stream_count = get_v(bc); nut->max_distance = get_v(bc); + nut->max_short_distance = get_v(bc); nut->rate_num= get_v(bc); nut->rate_den= get_v(bc); nut->short_startcode= get_v(bc);