[FFmpeg-devel] [PATCH] Waveform Archiver decoder and demuxer

Paul B Mahol onemda at gmail.com
Wed Feb 1 12:53:41 EET 2023


On 2/1/23, Tomas Härdin <git at haerdin.se> wrote:
>> +    if (avctx->extradata_size < 44)
>> +        return AVERROR_INVALIDDATA;
>> +    if (AV_RL32(avctx->extradata + 16) != MKTAG('R','I','F','F'))
>> +        return AVERROR_INVALIDDATA;
>> +    if (AV_RL32(avctx->extradata + 24) != MKTAG('W','A','V','E'))
>> +        return AVERROR_INVALIDDATA;
>> +    if (AV_RL32(avctx->extradata + 28) != MKTAG('f','m','t',' '))
>> +        return AVERROR_INVALIDDATA;
>> +    if (AV_RL16(avctx->extradata + 38) != 1 &&
>> +        AV_RL16(avctx->extradata + 38) != 2)
>> +        return AVERROR_INVALIDDATA;
>
> What in tarnation
>
>> +    av_channel_layout_default(&avctx->ch_layout, AV_RL16(avctx-
>> >extradata + 38));
>> +    avctx->sample_rate = AV_RL32(avctx->extradata + 40);
>>
>
> This belongs in the demuxer. In fact it appears the decoder duplicates

Decoder needs extradata as relevant information is not provided in
bitstream of packets.

> code from the demuxer. Why? Some samples would help.

Anybody is free to create samples.

>
> /Tomas
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list