Revision 6b4fab72

View differences:

libavformat/gxfenc.c
97 97
    { 0, 0 },
98 98
};
99 99

  
100
#define SERVER_PATH "/space/"
101
#define ES_NAME_PATTERN "ES."
100
#define SERVER_PATH "EXT:/PDR/default/"
101
#define ES_NAME_PATTERN "EXT:/PDR/default/ES."
102 102

  
103 103
static int gxf_find_lines_index(AVStream *st)
104 104
{
......
529 529
    GXFContext *gxf = s->priv_data;
530 530
    ByteIOContext *pb = s->pb;
531 531
    int64_t pos;
532
    int i;
532
    int i, j;
533 533

  
534 534
    pos = url_ftell(pb);
535 535
    gxf->umf_media_offset = pos - gxf->umf_start_offset;
536 536
    for (i = 0; i <= s->nb_streams; ++i) {
537 537
        GXFStreamContext *sc;
538
        char buffer[88];
539 538
        int64_t startpos, curpos;
540
        int path_size = strlen(ES_NAME_PATTERN);
541 539

  
542 540
        if (i == s->nb_streams)
543 541
            sc = &gxf->timecode_track;
544 542
        else
545 543
            sc = s->streams[i]->priv_data;
546 544

  
547
        memset(buffer, 0, 88);
548 545
        startpos = url_ftell(pb);
549 546
        put_le16(pb, 0); /* length */
550 547
        put_le16(pb, sc->media_info);
......
554 551
        put_le32(pb, 0); /* attributes rw, ro */
555 552
        put_le32(pb, 0); /* mark in */
556 553
        put_le32(pb, gxf->nb_fields); /* mark out */
557
        strncpy(buffer, ES_NAME_PATTERN, path_size);
558
        put_buffer(pb, (uint8_t *)buffer, path_size);
554
        put_buffer(pb, ES_NAME_PATTERN, sizeof(ES_NAME_PATTERN));
559 555
        put_be16(pb, sc->media_info);
560
        put_buffer(pb, (uint8_t *)buffer + path_size + 2, 88 - path_size - 2);
556
        for (j = sizeof(ES_NAME_PATTERN)+2; j < 88; j++)
557
            put_byte(pb, 0);
561 558
        put_le32(pb, sc->track_type);
562 559
        put_le32(pb, sc->sample_rate);
563 560
        put_le32(pb, sc->sample_size);
tests/libav.regression.ref
27 27
913b6199765b1dcba196706574621c2f *./tests/data/b-libav.dv
28 28
3600000 ./tests/data/b-libav.dv
29 29
./tests/data/b-libav.dv CRC=0x7787e173
30
71434c75f12f6f54f9cd8b86107a2c75 *./tests/data/b-libav.gxf
31
810208 ./tests/data/b-libav.gxf
30
1623fca05b137d378bffd5050bcb9eb3 *./tests/data/b-libav.gxf
31
810268 ./tests/data/b-libav.gxf
32 32
./tests/data/b-libav.gxf CRC=0x9c06676e
33 33
66a6584f9e83e8ea3af822a3ba71fbbe *./tests/data/b-libav.nut
34 34
329264 ./tests/data/b-libav.nut
tests/seek.regression.ref
2907 2907
ret:-22 st:-1 ts:-0.645825 flags:1
2908 2908
----------------
2909 2909
tests/data/b-libav.gxf
2910
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2910
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2911 2911
ret: 0 st:-1 ts:-1.000000 flags:0
2912
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2912
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2913 2913
ret: 0 st:-1 ts:1.894167 flags:1
2914
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2914
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2915 2915
ret: 0 st: 0 ts:0.780000 flags:0
2916
ret: 0 st: 0 dts:0.800000 pts:-184467440737095520.000000 pos:665572 size:22568 flags:0
2916
ret: 0 st: 0 dts:0.800000 pts:-184467440737095520.000000 pos:665632 size:22568 flags:0
2917 2917
ret: 0 st: 0 ts:-0.320000 flags:1
2918
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2918
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2919 2919
ret: 0 st: 1 ts:2.580000 flags:0
2920
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2920
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2921 2921
ret: 0 st: 1 ts:1.480000 flags:1
2922
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2922
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2923 2923
ret: 0 st: 2 ts:0.360000 flags:0
2924
ret: 0 st: 0 dts:0.360000 pts:-184467440737095520.000000 pos:308108 size:23176 flags:0
2924
ret: 0 st: 0 dts:0.360000 pts:-184467440737095520.000000 pos:308168 size:23176 flags:0
2925 2925
ret: 0 st: 2 ts:-0.740000 flags:1
2926
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2926
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2927 2927
ret: 0 st:-1 ts:2.153336 flags:0
2928
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2928
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2929 2929
ret: 0 st:-1 ts:1.047503 flags:1
2930
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2930
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2931 2931
ret: 0 st: 0 ts:-0.060000 flags:0
2932
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2932
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2933 2933
ret: 0 st: 0 ts:2.840000 flags:1
2934
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2934
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2935 2935
ret: 0 st: 1 ts:1.740000 flags:0
2936
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2936
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2937 2937
ret: 0 st: 1 ts:0.620000 flags:1
2938
ret: 0 st: 0 dts:0.640000 pts:-184467440737095520.000000 pos:504144 size:22976 flags:0
2938
ret: 0 st: 0 dts:0.640000 pts:-184467440737095520.000000 pos:504204 size:22976 flags:0
2939 2939
ret: 0 st: 2 ts:-0.480000 flags:0
2940
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2940
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2941 2941
ret: 0 st: 2 ts:2.420000 flags:1
2942
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2942
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2943 2943
ret: 0 st:-1 ts:1.306672 flags:0
2944
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2944
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2945 2945
ret: 0 st:-1 ts:0.200839 flags:1
2946
ret: 0 st: 0 dts:0.200000 pts:-184467440737095520.000000 pos:215268 size:20944 flags:0
2946
ret: 0 st: 0 dts:0.200000 pts:-184467440737095520.000000 pos:215328 size:20944 flags:0
2947 2947
ret: 0 st: 0 ts:-0.900000 flags:0
2948
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2948
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2949 2949
ret: 0 st: 0 ts:1.980000 flags:1
2950
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2950
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2951 2951
ret: 0 st: 1 ts:0.880000 flags:0
2952
ret: 0 st: 0 dts:0.880000 pts:-184467440737095520.000000 pos:710988 size:22456 flags:0
2952
ret: 0 st: 0 dts:0.880000 pts:-184467440737095520.000000 pos:711048 size:22456 flags:0
2953 2953
ret: 0 st: 1 ts:-0.220000 flags:1
2954
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2954
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2955 2955
ret: 0 st: 2 ts:2.680000 flags:0
2956
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2956
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2957 2957
ret: 0 st: 2 ts:1.560000 flags:1
2958
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755872 size:54320 flags:1
2958
ret: 0 st: 0 dts:0.960000 pts:-184467440737095520.000000 pos:755932 size:54320 flags:1
2959 2959
ret: 0 st:-1 ts:0.460008 flags:0
2960
ret: 0 st: 0 dts:0.480000 pts:-184467440737095520.000000 pos:375732 size:53804 flags:1
2960
ret: 0 st: 0 dts:0.480000 pts:-184467440737095520.000000 pos:375792 size:53804 flags:1
2961 2961
ret: 0 st:-1 ts:-0.645825 flags:1
2962
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:4964 size:65536 flags:1
2962
ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:5024 size:65536 flags:1
2963 2963
----------------
2964 2964
tests/data/b-libav.mkv
2965 2965
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:505 size:28088 flags:1

Also available in: Unified diff