[Ffmpeg-devel] [PATCH]ogg flac

matthieu castet castet.matthieu
Thu May 12 00:39:44 CEST 2005


M?ns Rullg?rd wrote:
> matthieu castet <castet.matthieu at free.fr> writes:
> 
> 
>>
>>PS : shouldn't we add a id for flac in codec_wav_tags, if we want to
>>transcode flac in another format ?
> 
> 
> Is there one in common use?
> 
> 
don't know : mux it in nut with a clip for example...
>>    int *header_number = os->private;
>>
>>    if (!os->private)
>>        os->private = header_number = av_mallocz(sizeof(int));
>>
>>    if (os->seq > *header_number)
>>        return 0;
> 
> 
> Why don't you just examine the first byte of the packet?  This is
> better for two reasons: 1) it's simpler, and 2) the header number is
> allowed to be zero, in which case this will break.
> 
header_number will nerver be 0 as there always the comment header ("The 
first packet is followed by one or more header packets.") Even if it was 
allow to be 0, I don't see were it could break : at the next call we 
will have 1 > 0, and it will return 0.

Why I do this : because we are in the ogg layer and I don't want to 
parse flac stream, flac decoder already do that.





More information about the ffmpeg-devel mailing list