[FFmpeg-devel] [PATCH] SHA-256 support

Diego Biurrun diego
Tue Jun 9 09:26:41 CEST 2009


On Tue, Jun 09, 2009 at 08:13:40AM +0300, Kostya wrote:
> On Mon, Jun 08, 2009 at 08:07:14PM +0200, Diego Biurrun wrote:
> > On Mon, Jun 08, 2009 at 08:34:37PM +0300, Kostya wrote:
> > >     for( i = 0; i < len; i++ ){
> > >         ctx->buffer[ j++ ] = data[i];
> > >         if( 64 == j ){
> > 
> > You inconsistently format all those if/for statements throughout the
> > file.  I suggest sticking to K&R style, which you already use in most
> > places.
> 
> Ahem, I consistently copypaste code from other parts of ffmpeg (in this
> case source is libavutil/sha1.c).

I'm aware that large parts of FFmpeg are inconsistent, but that is not a
good excuse =-)

>     while ((ctx->count & 63) != 56) {
>         av_sha256_update(ctx, "", 1);
>     }

pointless {}

>     for (k = 0; k < 3; k++) {
>         av_sha256_init(&ctx);
>         if(k==0)

if (

;-p

Diego



More information about the ffmpeg-devel mailing list