1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 23:02:37 +00:00

Rename exit_player() use outside core to exit_player_bad()

The VOs which use it shouldn't really exit the whole program. The
renaming will allow including mplayer.h in mplayer.c without clashing
with the static exit_player() there.
This commit is contained in:
Uoti Urpala 2008-08-12 14:50:54 +03:00
parent 9f7c6291a5
commit 8685eea8c2
4 changed files with 18 additions and 18 deletions

View File

@ -44,7 +44,7 @@
#include "mp_msg.h"
#include "video_out.h"
#include "video_out_internal.h"
#include "mplayer.h" /* for exit_player() */
#include "mplayer.h" /* for exit_player_bad() */
#include "help_mp.h"
/* ------------------------------------------------------------------------- */
@ -121,17 +121,17 @@ static void jpeg_mkdir(char *buf, int verbose) {
MSGTR_VO_GenericError, strerror(errno) );
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
MSGTR_VO_UnableToAccess,buf);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
if ( !S_ISDIR(stat_p.st_mode) ) {
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
buf, MSGTR_VO_ExistsButNoDirectory);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
if ( !(stat_p.st_mode & S_IWUSR) ) {
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
buf, MSGTR_VO_DirExistsButNotWritable);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name,
@ -143,7 +143,7 @@ static void jpeg_mkdir(char *buf, int verbose) {
MSGTR_VO_GenericError, strerror(errno) );
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
buf, MSGTR_VO_CantCreateDirectory);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
} /* end switch */
} else if ( verbose ) {
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name,
@ -192,7 +192,7 @@ static uint32_t jpeg_write(uint8_t * name, uint8_t * buffer)
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
info.short_name, MSGTR_VO_GenericError,
strerror(errno) );
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
cinfo.err = jpeg_std_error(&jerr);

View File

@ -40,7 +40,7 @@
#include "mp_msg.h"
#include "video_out.h"
#include "video_out_internal.h"
#include "mplayer.h" /* for exit_player() */
#include "mplayer.h" /* for exit_player_bad() */
#include "help_mp.h"
#include "libavutil/md5.h"
@ -86,7 +86,7 @@ int framenum = 0;
static void md5sum_write_error(void) {
mp_msg(MSGT_VO, MSGL_ERR, MSGTR_ErrorWritingFile, info.short_name);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
/* ------------------------------------------------------------------------- */
@ -152,7 +152,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
MSGTR_VO_CantCreateFile);
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
info.short_name, MSGTR_VO_GenericError, strerror(errno) );
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
return 0;

View File

@ -39,7 +39,7 @@
#include "mp_msg.h"
#include "video_out.h"
#include "video_out_internal.h"
#include "mplayer.h" /* for exit_player() */
#include "mplayer.h" /* for exit_player_bad() */
#include "help_mp.h"
/* ------------------------------------------------------------------------- */
@ -98,7 +98,7 @@ char *pnm_file_extension = NULL;
static void pnm_write_error(void) {
mp_msg(MSGT_VO, MSGL_ERR, MSGTR_ErrorWritingFile, info.short_name);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
/* ------------------------------------------------------------------------- */
@ -214,17 +214,17 @@ static void pnm_mkdir(char *buf, int verbose) {
MSGTR_VO_GenericError, strerror(errno) );
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
MSGTR_VO_UnableToAccess,buf);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
if ( !S_ISDIR(stat_p.st_mode) ) {
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
buf, MSGTR_VO_ExistsButNoDirectory);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
if ( !(stat_p.st_mode & S_IWUSR) ) {
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
buf, MSGTR_VO_DirExistsButNotWritable);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
if (strcmp(buf, ".") != 0) {
@ -238,7 +238,7 @@ static void pnm_mkdir(char *buf, int verbose) {
MSGTR_VO_GenericError, strerror(errno) );
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
buf, MSGTR_VO_CantCreateDirectory);
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
} /* end switch */
} else if ( verbose ) {
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name,
@ -442,7 +442,7 @@ static void pnm_write_image(mp_image_t *mpi)
if (!mpi) {
mp_msg(MSGT_VO, MSGL_ERR, "%s: No image data suplied to video output driver\n", info.short_name );
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
/* Start writing to new subdirectory after a certain amount of frames */
@ -474,7 +474,7 @@ static void pnm_write_image(mp_image_t *mpi)
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
info.short_name, MSGTR_VO_GenericError,
strerror(errno) );
exit_player(MSGTR_Exit_error);
exit_player_bad(MSGTR_Exit_error);
}
pnm_write_pnm(outfile, mpi);

View File

@ -39,7 +39,7 @@ extern int auto_quality;
extern int vobsub_id;
static inline void exit_player(const char *how)
static inline void exit_player_bad(const char *how)
{
if (how)
mp_msg(MSGT_CPLAYER, MSGL_INFO, "Deprecated exit call: %s", how);