Revision ca6ecf50 libavformat/nut.c

View differences:

libavformat/nut.c
49 49
#define    INDEX_STARTCODE (0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48)) 
50 50
#define     INFO_STARTCODE (0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48)) 
51 51

  
52
#define ID_STRING "nut/multimedia container\0"
53

  
52 54
#define MAX_DISTANCE (1024*16-1)
53 55
#define MAX_SHORT_DISTANCE (1024*4-1)
54 56

  
......
84 86
    uint64_t next_startcode;     ///< stores the next startcode if it has alraedy been parsed but the stream isnt seekable
85 87
    StreamContext *stream;
86 88
    int max_distance;
89
    int max_short_distance;
87 90
    int rate_num;
88 91
    int rate_den;
89 92
    int short_startcode;
......
510 513
    
511 514
    nut->stream =	
512 515
	av_mallocz(sizeof(StreamContext)*s->nb_streams);
516
        
517

  
518
    put_buffer(bc, ID_STRING, strlen(ID_STRING));
519
    put_byte(bc, 0);
520
    nut->packet_start[2]= url_ftell(bc);
513 521
    
514 522
    /* main header */
515 523
    put_be64(bc, MAIN_STARTCODE);
......
517 525
    put_v(bc, 2); /* version */
518 526
    put_v(bc, s->nb_streams);
519 527
    put_v(bc, MAX_DISTANCE);
528
    put_v(bc, MAX_SHORT_DISTANCE);
520 529
    
521 530
    put_v(bc, nut->rate_num=1);
522 531
    put_v(bc, nut->rate_den=2);
......
869 878
    
870 879
    nut->stream_count = get_v(bc);
871 880
    nut->max_distance = get_v(bc);
881
    nut->max_short_distance = get_v(bc);
872 882
    nut->rate_num= get_v(bc);
873 883
    nut->rate_den= get_v(bc);
874 884
    nut->short_startcode= get_v(bc);

Also available in: Unified diff