[FFmpeg-devel] [PATCH] Speex parser

Justin Ruggles justin.ruggles
Mon Aug 31 01:02:58 CEST 2009


Justin Ruggles wrote:

> Michael Niedermayer wrote:
> 
>> On Sun, Aug 30, 2009 at 10:40:45AM -0400, Justin Ruggles wrote:
>>> Hi,
>>>
>>> Here is a Speex parser.  It does not split any frames, but only analyzes
>>> them in order to set the proper AVCodecContext parameters.
>> the decoder can do this, av_find_stream_info() should already create a
>> decoder to fill these in when they are missing.
> 
> Why should it have to rely on the decoder...especially since we do not
> have a native decoder?  So that one MUST compile in an external library
> for stream copy to work properly.

If there is no problem with packet duration being 0 or wrong, then I
think stream copy could work without the parser or decoder.  I tried flv
to ogg and it seemed to work since timestamps were just copied from one
container to the other.  Packet duration was still wrong though, and I
don't know if that causes other problems.

>>> It is useful mainly for stream copy when no header is present or if some
>>> values in the header are encoded as "unknown".  Also, if the extradata
>>> is missing, the parser will create it using correct values.  This is
>>> better than what is done currently in the FLV demuxer, which guesses
>>> some header values based on defaults and sets some as "unknown".
>> it seems creating fake(1) extradata belongs more in a bitstream filter than
>> a parser
>>
>> (1) fake in the sense that it does not exist like that in the container
> 
> Ok, I'll look into that.

It doesn't seem to work.  The bitstream filter is not run until the
first packet is written.  By that time, the muxer has already been
initialized without any extradata and fails.  Am I missing something?

Thanks,
Justin




More information about the ffmpeg-devel mailing list