On Tue, Mar 05, 2013 at 05:22:26PM +0100, Luca Barbato wrote: > --- a/libavcodec/shorten.c > +++ b/libavcodec/shorten.c > @@ -123,17 +123,20 @@ static int allocate_buffers(ShortenContext *s) > > - tmp_ptr = av_realloc(s->offset[chan], sizeof(int32_t)*FFMAX(1, > s->nmean)); > + tmp_ptr = > + av_realloc(s->offset[chan], sizeof(int32_t) * FFMAX(1, > s->nmean));
I'd rather break the line after the comma. > @@ -307,11 +306,12 @@ static int decode_subframe_lpc(ShortenContext *s, int > command, int channel, > > - for (j=0; j<pred_order; j++) > - sum += coeffs[j] * s->decoded[channel][i-j-1]; > - s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, > residual_size) + (sum >> qshift); > + for (j = 0; j < pred_order; j++) > + sum += coeffs[j] * s->decoded[channel][i - j - 1]; > + s->decoded[channel][i] = > + get_sr_golomb_shorten(&s->gb, residual_size) + (sum >> qshift); similar situation here, linebreak after + is more like our style > @@ -407,17 +410,18 @@ static int shorten_decode_frame(AVCodecContext *avctx, > void *data, > > - s->max_framesize= 1024; // should hopefully be enough for the first > header > - tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, > - s->max_framesize); > + s->max_framesize = 1024; // should hopefully be enough for the first > header > + tmp_ptr = > + av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, > + s->max_framesize); Dunno if that is really better, the two assignments are unrelated (not all members of the same struct or similar), so you might skip the alignment. > @@ -426,29 +430,32 @@ static int shorten_decode_frame(AVCodecContext *avctx, > void *data, > > /* append current packet data to bitstream buffer */ > - if(1 && s->max_framesize){//FIXME truncated > + if (1 && s->max_framesize) { //FIXME truncated unrelated, but how silly is that? nit: you might add space after // > @@ -546,21 +553,23 @@ static int shorten_decode_frame(AVCodecContext *avctx, > void *data, > } else { > - if ((ret = decode_subframe_lpc(s, cmd, channel, > residual_size, coffset)) < 0) > + if ((ret = > + decode_subframe_lpc(s, cmd, channel, residual_size, > + coffset)) < 0) ugly linebreak, break after channel > @@ -597,12 +606,12 @@ static int shorten_decode_frame(AVCodecContext *avctx, > void *data, > > finish_frame: > - s->bitindex = get_bits_count(&s->gb) - 8*((get_bits_count(&s->gb))/8); > - i= (get_bits_count(&s->gb))/8; > + s->bitindex = get_bits_count(&s->gb) - 8 * ((get_bits_count(&s->gb)) / > 8); > + i = (get_bits_count(&s->gb)) / 8; pointless parentheses around the function call Take or leave what you will of my suggestions and push. Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel