[FFmpeg-soc] [soc]: r3884 - amr/amrnbdec.c

Benjamin Larsson banan at ludd.ltu.se
Mon Dec 15 13:13:11 CET 2008


Robert Swain wrote:
> 2008/12/15 Robert Swain <robert.swain at gmail.com>:
>   
>> 2008/12/15 diego <subversion at mplayerhq.hu>:
>>     
>>> Author: diego
>>> Date: Mon Dec 15 11:13:50 2008
>>> New Revision: 3884
>>>
>>> Log:
>>> K&R function declaration and whitespace cosmetics
>>>
>>>
>>> Modified:
>>>   amr/amrnbdec.c
>>>
>>> Modified: amr/amrnbdec.c
>>> ==============================================================================
>>> --- amr/amrnbdec.c      (original)
>>> +++ amr/amrnbdec.c      Mon Dec 15 11:13:50 2008
>>> @@ -76,8 +76,8 @@ typedef struct AMRContext {
>>>  } AMRContext;
>>>
>>>
>>> -static int amrnb_decode_init(AVCodecContext *avctx) {
>>> -
>>> +static int amrnb_decode_init(AVCodecContext *avctx)
>>> +{
>>>     AMRContext *p = avctx->priv_data;
>>>
>>>     // variables needed for cos table generation
>>> @@ -126,8 +126,9 @@ static int amrnb_decode_init(AVCodecCont
>>>  * @return Returns the frame mode
>>>  */
>>>
>>> -enum Mode decode_bitstream(AVCodecContext *avctx, uint8_t *buf, int buf_size, enum Mode *speech_mode) {
>>> -
>>> +enum Mode decode_bitstream(AVCodecContext *avctx, uint8_t *buf, int buf_size,
>>> +                           enum Mode *speech_mode)
>>> +{
>>>       
>> Urgh. I'm happy with the line breaks but I don't tend to like the
>> opening { on a new line. I thought that was a GNU thing not a K&R
>> thing.
>>     
>
> Nope, it is K&R. Hmm, then who likes them on the same line other than me? :)
>
> Rob
>   

I do, it is more readable to me. More code per loc.

MvH
Benjamin Larsson





More information about the FFmpeg-soc mailing list