Ticket #2252: wtv.patch

File wtv.patch, 1.5 KB (added by al3x, 11 years ago)
  • libavformat/wtvenc.c

    diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
    index 8aebddd..d9355c5 100644
    a b static int write_stream_codec(AVFormatContext *s, AVStream * st)  
    318318{
    319319    AVIOContext *pb = s->pb;
    320320    int ret;
    321     write_chunk_header2(s, &ff_stream1_guid, 0x80000000 | 0x01);
    322321
    323     avio_wl32(pb,  0x01);
    324     write_pad(pb, 4);
    325     write_pad(pb, 4);
     322    // FIXME: which player requires this stream descriptor? And which one does ff_stream2_guid?
     323    write_chunk_header2(s, &ff_stream1_guid, 0x80000000 | (st->index + INDEX_BASE));
     324    avio_wl32(pb, st->index + INDEX_BASE); // stream_id
     325    write_pad(pb, 4);                      // unknown/reserved (0)
     326    write_pad(pb, 4);                      // unknown/reserved (0)
    326327
    327328    ret = write_stream_codec_info(s, st);
    328329    if (ret < 0) {
    static int write_stream_data(AVFormatContext *s, AVStream *st)  
    357358    int ret;
    358359
    359360    write_chunk_header2(s, &ff_SBE2_STREAM_DESC_EVENT, 0x80000000 | (st->index + INDEX_BASE));
    360     avio_wl32(pb, 0x00000001);
     361    avio_wl32(pb, 0x00000001);             // version
    361362    avio_wl32(pb, st->index + INDEX_BASE); //stream_id
    362     avio_wl32(pb, 0x00000001);
    363     write_pad(pb, 8);
     363    avio_wl32(pb, 0x00000001);             // default stream for file? (FIXME: mark non zero only for one stream per type)
     364    write_pad(pb, 8);                      // reserved (FIXME: should be 4 bytes)
    364365
    365366    ret = write_stream_codec_info(s, st);
    366367    if (ret < 0) {