[MPlayer-cvslog] CVS: main/libmpcodecs dec_video.c,1.162,1.163
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Wed Aug 31 11:45:34 CEST 2005
On Wednesday, 31 August 2005 at 11:33, Guillaume POIRIER wrote:
> Hi,
>
> On 8/31/05, Attila Kinali CVS <syncmail at mplayerhq.hu> wrote:
> > CVS change done by Attila Kinali CVS
> >
> > Update of /cvsroot/mplayer/main/libmpcodecs
> > In directory mail:/var2/tmp/cvs-serv23001
> >
> > Modified Files:
> > dec_video.c
> > Log Message:
> > 10l
> > variables have to be declared before any command.
> >
> >
> > Index: dec_video.c
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
> > retrieving revision 1.162
> > retrieving revision 1.163
> > diff -u -r1.162 -r1.163
> > --- dec_video.c 30 Aug 2005 23:56:23 -0000 1.162
> > +++ dec_video.c 31 Aug 2005 09:24:44 -0000 1.163
> > @@ -163,10 +163,10 @@
> > }
> >
> > int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
> > + int force = 0;
> > unsigned int orig_fourcc=sh_video->bih?sh_video->bih->biCompression:0;
> > sh_video->codec=NULL;
> > sh_video->vf_inited=0;
> > - int force = 0;
> > if (codecname && codecname[0] == '+') {
> > codecname = &codecname[1];
> > force = 1;
>
> Maybe it's just me, but I don't quite see how this can fix any problem
> that may exist here, as "force" was is not used on the 3 lines that
> follow the new location of "int force = 0;".
>
> Is that another "10l" ? :)
No. It's just that older C compilers (like GCC 2.95) report an error if
there are any variable declarations within a block of code. So, all
variables must be declared before any code. AFAIK it's in some C standard,
like ANSI C or something.
R.
--
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
We stand between the darkness ... and the light."
-- Delenn in Grey Council in Babylon 5:"Babylon Squared"
More information about the MPlayer-cvslog
mailing list