[FFmpeg-cvslog] r19812 - trunk/libavformat/aea.c

Benjamin Larsson banan
Sun Sep 13 21:14:15 CEST 2009


Vitor Sessak wrote:

>> +static int aea_read_probe(AVProbeData *p)
>> +{
>> +    if (p->buf_size <= 2048+212)
>> +        return 0;
>> +
>> +    /* Magic is '00 08 00 00' in Little Endian*/
>> +    if(AV_RL32(p->buf)==0x800) {
>> +        int bsm_s, bsm_e, inb_s, inb_e;
>> +        bsm_s = p->buf[2048];
>> +        inb_s = p->buf[2048+1];
>> +        inb_e = p->buf[2048+210];
>> +        bsm_e = p->buf[2048+211];
>> +
>> +
>> +        /* Check so that the redundant bsm bytes and info bytes are
>> valid
>> +         * the block size mode bytes have to be the same
>> +         * the info bytes have to be the same
>> +         * the block size mode and info byte can't be the same
>> +         */
>> +        if (bsm_s == bsm_e && inb_s == inb_e && bsm_s != inb_s)
>> +            return AVPROBE_SCORE_MAX/2;
> 
> Maybe this can be improved by checking the sanity of the number of channels
> 
> -Vitor

Added.

MvH
Benjamin Larsson



More information about the ffmpeg-cvslog mailing list