[FFmpeg-devel] [PATCH] RealAudio SIPR @16k decoder (4/4) demuxer

Benjamin Larsson banan
Wed Sep 24 22:04:46 CEST 2008


I'll commit the OK'ed parts tomorrow.

> 
> 
>> @@ -146,6 +157,14 @@
>>                  ((uint8_t*)st->codec->extradata)[i] = get_byte(pb);
>>              rm->audio_framesize = st->codec->block_align;
>>              st->codec->block_align = rm->sub_packet_size;
>> +            if (st->codec->codec_id == CODEC_ID_SIPR) {
>> +                if ((flavor>=0) || (flavor<4))
>> +                    st->codec->block_align = sipr_subpk_size[flavor];
>> +                else {
>> +                    av_log(s, AV_LOG_ERROR, "flavor = %d not in [0-3] range, invalid value!\n", flavor);
>> +                    return -1;
>> +                }
>> +            }
> 
> is there really no field at the demxuer layer that is the packet size?

I don't know. I have no idea how .rm works. The only thing I do know is
that they stuff several codec frames into 1 packet. I think most of the
block_align manipulation is because of that. I think Roberto has to
answer this question if you want a better answer.

> this also applies a little to the other codecs which also each do
> different things with block_align ...
> 

MvH
Benjamin Larsson




More information about the ffmpeg-devel mailing list