[FFmpeg-devel] [patch]add a guid for asf header parser
Ronald S. Bultje
rsbultje
Thu Jul 15 01:09:57 CEST 2010
Hi,
On Wed, Jul 14, 2010 at 5:35 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> On Mon, Jul 5, 2010 at 1:01 PM, zhentan feng <spyfeng at gmail.com> wrote:
>> + ? ? ? ? ? ?while(record_cnt > 0) {
>> + ? ? ? ? ? ? ? ?flags = AV_RL16(pos);
>> + ? ? ? ? ? ? ? ?pos += 2;
>> + ? ? ? ? ? ? ? ?stream_id = flags & 0x7F;
>> + ? ? ? ? ? ? ? ?mms->streams[stream_id].rate = AV_RL32(pos);
>> + ? ? ? ? ? ? ? ?pos += 4;
>> + ? ? ? ? ? ? ? ?record_cnt--;
>> + ? ? ? ? ? ?}
>
> This is almost certainly wrong. stream_id isn't an array index, it's
> an ASF stream ID, which starts at once, as written in
> mms->streams[x].id. You need to either compare them to stream[x].id,
> or set stream[x].id accordingly (and then disregard the stream chunk
> above altogether).
In fact, is stream[x].rate ever used? If not, this seems a little pointless.
Ronald
More information about the ffmpeg-devel
mailing list