[MPlayer-dev-eng] [PATCH] Report the reason to exit for -identify

rvm rvm3000 at ya.com
Mon Nov 24 02:47:20 CET 2008


El Domingo, 16 de Noviembre de 2008 00:06, rvm escribió:
> El Sábado, 15 de Noviembre de 2008 16:09, Andrew Savchenko escribió:
> > Hi,
> >
> > On Wednesday 12 November 2008 02:36, rvm wrote:
> > [...]
> >
> > > Index: mplayer.c
> > > ================================================================
> > >=== --- mplayer.c	(revisión: 27904)
> > > +++ mplayer.c	(copia de trabajo)
> > > @@ -685,7 +685,7 @@
> > >    current_module=NULL;
> > >  }
> > >
> > > -void exit_player_with_rc(const char* how, int rc){
> > > +void exit_player_with_rc(ExitReason how, int rc){
> >
> > IMHO, exit_reason_t will suit better for mplayer.c coding style.
> >
> > [...]
> >
> > > switch(how) {
> > > +  case EXIT_QUIT:
> > > +
> > > mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_quit);
> > > +    mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=QUIT\n"); +
> > > break;
> > > +  case EXIT_EOF:
> > > +
> > > mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_eof);
> > > +    mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=EOF\n"); +
> > > break;
> > > +  case EXIT_ERROR:
> > > +
> > > mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_error)
> > >; +    mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=ERROR\n"); +
> > > break;
> > > +  default:
> > > +    mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT\n");
> >
> > Maybe you should use "ID_EXIT=NULL" (or NONE if you like it more)
> > for consistency?
> >
> > Otherwise it looks ok for me.
>
> Attached patch with the suggested changes.

Attached new version of the patch for r28011 (previous one doesn't work 
anymore).

Is there anything else which needs to be fixed in the patch?

-- 
rvm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: id_exit_enum3.diff
Type: text/x-diff
Size: 7138 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081124/247fb0aa/attachment.diff>


More information about the MPlayer-dev-eng mailing list