[MPlayer-dev-eng] [PATCH] Report the reason to exit for -identify
Andrew Savchenko
bircoph at gmail.com
Sat Nov 15 16:09:51 CET 2008
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.
--
Best regards,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081115/ed07e30a/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list