[FFmpeg-devel] [RFC][PATCH] C89 on ffplay.c

Måns Rullgård mans
Sat May 15 19:05:35 CEST 2010


"Fran?ois Revol" <revol at free.fr> writes:

> This fixes C89 for the few platforms that don't handle C99.
>
> Any objection ?
>
> Fran?ois.
>
> Index: ffplay.c
> ===================================================================
> --- ffplay.c	(revision 23142)
> +++ ffplay.c	(working copy)
> @@ -1567,6 +1567,7 @@
>      int perms = AV_PERM_WRITE;
>      int w, h, stride[4];
>      unsigned edge;
> +    int i;
>  
>      if(pic->buffer_hints & FF_BUFFER_HINTS_VALID) {
>          if(pic->buffer_hints & FF_BUFFER_HINTS_READABLE) perms |= AV_PERM_READ;
> @@ -1587,7 +1588,7 @@
>  
>      ref->w = codec->width;
>      ref->h = codec->height;
> -    for(int i = 0; i < 3; i ++) {
> +    for(i = 0; i < 3; i ++) {
>          unsigned hshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w;
>          unsigned vshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h;
>  

Obviously OK.  Mixing declarations and statements is against our rules.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list