[MPlayer-dev-eng] [PATCH] Report the reason to exit for -identify
rvm
rvm3000 at ya.com
Sun Nov 16 00:06:37 CET 2008
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.
--
rvm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: id_exit_enum2.diff
Type: text/x-diff
Size: 7082 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081116/5e24aab0/attachment.diff>
More information about the MPlayer-dev-eng
mailing list