[MPlayer-cvslog] r35359 - trunk/stream/asf_streaming.c
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Nov 10 19:55:45 CET 2012
On Wed, Nov 07, 2012 at 08:41:39AM +0800, Xidorn Quan wrote:
> On Wed, Nov 7, 2012 at 1:05 AM, Reimar Döffinger
> <Reimar.Doeffinger at gmx.de>wrote:
>
> > On Tue, Nov 06, 2012 at 04:53:41PM +0100, upsuper wrote:
> > > Author: upsuper
> > > Date: Tue Nov 6 16:53:41 2012
> > > New Revision: 35359
> > >
> > > Log:
> > > Comment out unused code
> > >
> > > Modified:
> > > trunk/stream/asf_streaming.c
> > >
> > > Modified: trunk/stream/asf_streaming.c
> > >
> > ==============================================================================
> > > --- trunk/stream/asf_streaming.c Tue Nov 6 07:13:12 2012
> > (r35358)
> > > +++ trunk/stream/asf_streaming.c Tue Nov 6 16:53:41 2012
> > (r35359)
> > > @@ -78,6 +78,7 @@ static int asf_streaming_start( stream_t
> > > int port = stream->streaming_ctrl->url->port;
> > >
> > > // Is protocol mms or mmsu?
> > > + /*
> > > if (!strcasecmp(proto, "mmsu") || !strcasecmp(proto, "mms"))
> > > {
> > > mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/UDP...\n");
> > > @@ -86,6 +87,7 @@ static int asf_streaming_start( stream_t
> > > mp_msg(MSGT_NETWORK,MSGL_V," ===> ASF/UDP failed\n");
> > > if( fd==-2 ) return -1;
> > > }
> > > + */
> >
> > While mostly useless, that code sure isn't unused.
> > Before with -v it would at least print
> > Trying ASF/UDP...
> > ===> ASF/UDP failed
> > when using mmsu://, now that just fails silently without any
> > hint of what went wrong.
> >
>
> I consider this message misleading since no trying actually happened.
> This message is also not in a log level above INFO, so I don't think
> it is necessary to worry about changing it.
>
>
> > Not to mention that leaving around commented-out code is not
> > particularly useful anyway, if there's not point in removing it
> > completely might make sense, or otherwise if it is really
> > useful to keep around for some reason, putting it under
> > "if (0)" make sure it will at least kept compilable.
> >
>
> Well, it seems to be just unimplemented yet.
"yet" as in "at least since 10 years".
Now add on top that UDP won't work anyway for at least 50% of users
and the mms protocol is deprecated anyway.
> I put it into comment to
> silence a "logically dead code" issue reported by coverity. So should
> I just comment the two conditional statement out for this?
Because of the above, my suggestion would have been to remove
that code, plus any and all references to "mmsu".
More information about the MPlayer-cvslog
mailing list