[FFmpeg-devel] [PATCH] flac demuxer

Justin Ruggles justinruggles
Fri May 2 05:42:54 CEST 2008


Michael Niedermayer wrote:
> On Wed, Apr 30, 2008 at 10:15:35PM -0400, Justin Ruggles wrote:
>> Hi,
>>
>> I wrote:
>>> I'll make the appropriate changes and submit new patch(es).
>> Here are 6 new patches which do the same as the last patch.
>>
>> -Justin
>>
>>
>>[...]
>> diff --git a/libavcodec/flac.c b/libavcodec/flac.c
>> index 28e25e7..fb1ac49 100644
>> --- a/libavcodec/flac.c
>> +++ b/libavcodec/flac.c
>> @@ -119,7 +119,7 @@ static av_cold int flac_decode_init(AVCodecContext * avctx)
>>  
>>  static void dump_headers(AVCodecContext *avctx, FLACContext *s)
>>  {
>> -    av_log(avctx, AV_LOG_DEBUG, "  Blocksize: %d .. %d (%d)\n", s->min_blocksize, s->max_blocksize, s->blocksize);
>> +    av_log(avctx, AV_LOG_DEBUG, "  Blocksize: %d .. %d\n", s->min_blocksize, s->max_blocksize);
>>      av_log(avctx, AV_LOG_DEBUG, "  Max Framesize: %d\n", s->max_framesize);
>>      av_log(avctx, AV_LOG_DEBUG, "  Samplerate: %d\n", s->samplerate);
>>      av_log(avctx, AV_LOG_DEBUG, "  Channels: %d\n", s->channels);
> 
> why?

ok, i guess this should really be done at the same time as patch #5, and
should also include changing the input to a FLACStreaminfo instead of a
FLACContext.

> 
> [...]
>> +#ifndef FFMPEG_FLAC_H
>> +#define FFMPEG_FLAC_H
>> +
>> +#include "avcodec.h"
>> +
>> +/**
>> + * Data needed from the Streaminfo header for use by the raw FLAC demuxer
>> + * and/or the FLAC decoder.
>> + */
>> +#define FLACSTREAMINFO \
>> +    int min_blocksize;      /**< minimum block size, in samples          */\
>> +    int max_blocksize;      /**< maximum block size, in samples          */\
>> +    int max_framesize;      /**< maximum frame size, in bytes            */\
>> +    int samplerate;         /**< sample rate                             */\
>> +    int channels;           /**< number of channels                      */\
>> +    int bps;                /**< bits-per-sample                         */\
>> +
>> +#endif /* FFMPEG_FLAC_H */
> 
> This file does NOT need avcodec.h

sure enough.  I'll take it out.

New patch set:

already approved:
0001-change-function-params-for-metadata_streaminfo.patch
0002-change-function-params-for-dump_headers.patch
0005-move-init_get_bits-inside-conditional.patch

attached:
0003-split-out-some-decoder-context-params-to-a-shared-macro.patch
0004-share-streaminfo-parsing-function.patch


Thanks,
Justin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-split-out-some-decoder-context-params-to-a-shared-ma.patch
Type: text/x-diff
Size: 2758 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080501/d03f5b8f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-share-streaminfo-parsing-function.patch
Type: text/x-diff
Size: 3883 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080501/d03f5b8f/attachment-0001.patch>



More information about the ffmpeg-devel mailing list