On 02/26/2012 09:30 AM, Diego Biurrun wrote:

> On Sat, Feb 25, 2012 at 08:06:42PM -0500, Justin Ruggles wrote:
>> This also allows for removing some of the Vorbis-related hacks.
>> ---
>>  libavcodec/Makefile          |    1 +
>>  libavcodec/allcodecs.c       |    1 +
>>  libavcodec/vorbis_parser.c   |  270 
>> ++++++++++++++++++++++++++++++++++++++++++
>>  libavcodec/vorbis_parser.h   |   68 +++++++++++
>>  libavcodec/vorbisdec.c       |    1 -
>>  libavformat/oggparsevorbis.c |    1 +
>>  libavformat/rtpdec.c         |    3 +
>>  libavformat/utils.c          |    6 +-
>>  8 files changed, 345 insertions(+), 6 deletions(-)
>>  create mode 100644 libavcodec/vorbis_parser.c
>>  create mode 100644 libavcodec/vorbis_parser.h
>>
>> --- /dev/null
>> +++ b/libavcodec/vorbis_parser.c
>> @@ -0,0 +1,270 @@
>> +    /* check for header signature */
>> +    if (memcmp(&buf[1], "vorbis", 6)) {
>> +        av_log(avctx, AV_LOG_ERROR, "Invalid packet signature in Setup 
>> header\n");
> 
> nit: lone line
> 
>> +    mode_count = 0;
>> +    got_mode_header = 0;
> 
> nit: align
> 
>> +    s->avctx = avctx;
>> +    s->extradata_parsed = 1;
> 
> ditto
> 
>> +    s->valid_extradata = 1;
>> +    s->previous_blocksize = s->mode_blocksize[0];
> 
> ditto
> 
>> +#if CONFIG_VORBIS_PARSER
>> +static int vorbis_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
> 
> This file is compiled under that condition, so the #if is pointless.


The point is that the functions not included there can (and will) be
reused by other components. See patch 3/3.

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to