[FFmpeg-devel] put_chunk incorrect?

Eric Bellotti EricB
Thu May 21 00:32:52 CEST 2009


Hi,

I'm digging through the asf_stream code, and found this
oddity in asfenc.c:

static void put_chunk(AVFormatContext *s, int type, int payload_length,
int flags)
{
    ASFContext *asf = s->priv_data;
    ByteIOContext *pb = s->pb;
    int length;

    length = payload_length + 8;
    put_le16(pb, type);
    put_le16(pb, length);    //size
    
    put_le32(pb, asf->seqno);//sequence number
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    put_le16(pb, flags); /* unknown bytes */
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    put_le16(pb, length);    //size_confirm
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    asf->seqno++;
}

Looking at the MS-WMSP specs it says packets such as $H header
(2.2.3.5) have the format defined as:

- B (1 bit)
- Frame (7 bits)
- Packet ID (byte)
- Packet Length (2 bytes)
- Reason (4 bytes, spec says this field MUST NOT be present)
- Payload (variable)

All of these (except payload) are handled by int type and int
payload_length.
Payload is the actual ASF header that starts with the GUID
(ff_asf_header), 0x3026b275, etc...  There is nothing in between
according
To the specs, and no mention of seq no, flags or len.  Looking at the
traces
from the WMS streamer PC GUI, I do not see these fields either.  Note
that
with these fields, if attempting to stream to WMS, the server craps out
with
404 as it doesn't find the asf header GUID.

Svn blame goes back to 2004, and shows "micheal and philipjsg" as
authors for those lines.  Can anyone shed any light on this?

-Eric



More information about the ffmpeg-devel mailing list