[MPlayer-dev-eng] 10l bug in network code?

Felix Buenemann atmosfear at users.sourceforge.net
Thu Aug 15 15:13:22 CEST 2002


On Thursday 15 August 2002 05:47, Bertrand Baudet wrote:
> On Monday 05 August 2002 06:24 am, Felix Buenemann wrote:
> > On Monday 05 August 2002 02:31, Arpi wrote:
> > > Hi,
> > >
> > > while reviewing teh live.com patch, i've found this in network.c,
> > > seems to be some debug code, forgotten to remove:
> > >
> > >                 // Get the extension of the file if present
> > >                 if( url->file!=NULL ) {
> > >                         for( i=strlen(url->file) ; i>0 ; i-- ) {
> > >                                 if( url->file[i]=='.' ) {
> > >                                         extension=(url->file)+i+1;
> > >                                         break;
> > >                                 }
> > >                         }
> > >                 }
> > > extension=NULL;
> > >                 if( extension!=NULL ) {
> > >                   mp_msg(MSGT_NETWORK,MSGL_DBG2,"Extension: %s\n",
> > > extension); // Look for the extension in the extensions table ...
> > >
> > > note that line 'extension=NULL;'
> > >
> > > is it a workaround for something or it was added to test/debug
> > > something and commited by accident?
> >
> > I guess you are right, that it's debug code, rev 1.9 to 1.10 has this:
> > ---
> > -//     extension=NULL;
> > +extension=NULL;
> >                 if( extension!=NULL ) {
> > ---
> >
> > The commit was by Bertrand Baudet, so he should check it.
>
> Sorry for not answering earlier, but I was in vacation...
> Yes, this is my stuff.
> I introduced this when I was doing the network layer, at this time
> I was testing the result of the demuxer type guessing from both
> extension and mime type. For now the mime type guessing is more
> accurate than relying on the extension. The line "extension=NULL"
> just disable the extension guessing. I can ifdef/comment out the code
> section if you want.
> Anyway I should have put a comment for this :p
IMHO it's cleaner to #if 0 the disabled code and put a comment.

> Bertrand

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list