[FFmpeg-devel] [PATCH] FLAC parser

Michael Chinen mchinen
Thu Sep 30 04:38:51 CEST 2010


On Wed, Sep 29, 2010 at 2:51 AM, Justin Ruggles
<justin.ruggles at gmail.com> wrote:
> Justin Ruggles wrote:
>
>> Michael Chinen wrote:
>>
>>> Hi,
>>>
>>> On Mon, Sep 27, 2010 at 1:32 AM, Felipe Contreras
>>> <felipe.contreras at gmail.com> wrote:
>>>> 2010/9/26 M?ns Rullg?rd <mans at mansr.com>:
>>>>> Felipe Contreras <felipe.contreras at gmail.com> writes:
>>>>>
>>>>>> On Sun, Sep 26, 2010 at 1:58 PM, Michael Chinen <mchinen at gmail.com> wrote:
>>>>>>> On Sun, Sep 26, 2010 at 2:00 AM, Felipe Contreras
>>>>>>> [...]
>>>>>>>> Ah, I needed CONFIG_FLAC_PARSER.
>>>>>>> I would like to test this. ?I am running configure without any mention
>>>>>>> of the parser. ?How can I get it to go without CONFIG_FLAC_PARSER?
>>>>>> I guess --disable-parser=flac
>>>>>>
>>>>>>>> Since now the decoder doesn't work without the parser, wouldn't a
>>>>>>>> dependency should somehow be specified?
>>>>>>> Is this dependency undesirable? ?I can look into getting both cases to
>>>>>>> work if so.
>>>>>> I don't know, but with your patches this stopped working:
>>>>>> ./configure --disable-everything --enable-decoder='flac'
>>>>>> --enable-demuxer='ogg,flac' --enable-protocol=file
>>>>>> --enable-encoder='pcm_s16le' --enable-muxer='wav'
>>>>>>
>>>>>> ffmpeg -i test.flac test.wav
>>>>> The demuxer probably needs the parser to find frame boundaries. ?Can
>>>>> it play flac in ogg (where ogg provides the framing)?
>>>> I haven't tried this yet, but at least it doesn't seem to work with my
>>>> gst-av[1] stuff, so I think the problem is in the decoder itself.
>>> Any ogg related thing is definitely not supported in this
>>> parser/decoder (nor in the previous flacdec.c).
>>> flac in ogg is .ogg file right? - should it be handled by this parser/decoder?
>>>
>>> The patch isn't ready quite yet, but I'm working on it.
>>
>> I can confirm that Ogg/FLAC doesn't work when you disable the parser,
>> but it does work when you enable the parser. ?This is weird because the
>> Ogg demuxer doesn't even set st->need_parsing. ?Plus, like Mans said,
>> Ogg shouldn't need to use the parser. ?If Michael doesn't already have
>> it figured out, I'll see if I can find the problem this afternoon after
>> work.
>
> Ok, I take that back. ?I thought I was testing an ogg file, but it was
> really a raw flac file. ?I tested again with ogg/flac files made with
> both the flac commandline tool and with ffmpeg and the previous patch,
> including changes to flacdec.c work just fine for me. ?Can anyone else
> reproduce the problems that Felipe is having? ?Or can you give more info
> Felipe?

When I configure with --disable-parser=flac

if I run files generated with "ffmpeg -i a.wav -acodec flac a.ogg"
The decoder works fine.

but if I try to do Yesterday.ogg (flac in ogg sample) it fails

I get a fail:
[NULL @ 0x1002600] Probed with size=2048 and score=100
[flac @ 0x1004000] invalid frame header: frame sync error
[flac @ 0x1004000] decode_frame() failed
[flac @ 0x1004000] invalid frame header: frame sync error
[flac @ 0x1004000] decode_frame() failed
[flac @ 0x1004000] invalid frame header: frame sync error
[flac @ 0x1004000] decode_frame() failed
(etc)

Michael



More information about the ffmpeg-devel mailing list