mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
libvo: remove exit_player_bad()
For some reason, these 3 VOs basically call exit() if something went wrong.
This commit is contained in:
parent
bff71641f6
commit
17b69493b7
@ -44,7 +44,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "video_out.h"
|
||||
#include "video_out_internal.h"
|
||||
#include "mplayer.h" /* for exit_player_bad() */
|
||||
#include "osdep/io.h"
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -117,17 +116,17 @@ static void jpeg_mkdir(const char *buf, int verbose) {
|
||||
_("This error has occurred"), strerror(errno) );
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
|
||||
_("Unable to access"), buf);
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
if ( !S_ISDIR(stat_p.st_mode) ) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
|
||||
buf, _("already exists, but is not a directory."));
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
if ( !(stat_p.st_mode & S_IWUSR) ) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
|
||||
buf, _("Output directory already exists, but is not writable."));
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
|
||||
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name,
|
||||
@ -139,7 +138,7 @@ static void jpeg_mkdir(const char *buf, int verbose) {
|
||||
_("This error has occurred"), strerror(errno) );
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
|
||||
buf, _("Unable to create output directory."));
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
} /* end switch */
|
||||
} else if ( verbose ) {
|
||||
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name,
|
||||
@ -188,7 +187,7 @@ static uint32_t jpeg_write(const char * name, uint8_t * buffer)
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
|
||||
info.short_name, _("This error has occurred"),
|
||||
strerror(errno) );
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "video_out.h"
|
||||
#include "video_out_internal.h"
|
||||
#include "mplayer.h" /* for exit_player_bad() */
|
||||
#include "libavutil/md5.h"
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -78,7 +77,6 @@ int framenum = 0;
|
||||
|
||||
static void md5sum_write_error(void) {
|
||||
mp_tmsg(MSGT_VO, MSGL_ERR, "%s: Error writing file.\n", info.short_name);
|
||||
exit_player_bad(_("Fatal error"));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -144,7 +142,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||
_("Unable to create output file."));
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
|
||||
info.short_name, _("This error has occurred"), strerror(errno) );
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "video_out.h"
|
||||
#include "video_out_internal.h"
|
||||
#include "mplayer.h" /* for exit_player_bad() */
|
||||
#include "osdep/io.h"
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -98,7 +97,6 @@ char *pnm_file_extension = NULL;
|
||||
|
||||
static void pnm_write_error(void) {
|
||||
mp_tmsg(MSGT_VO, MSGL_ERR, "%s: Error writing file.\n", info.short_name);
|
||||
exit_player_bad(_("Fatal error"));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -209,17 +207,17 @@ static void pnm_mkdir(char *buf, int verbose) {
|
||||
_("This error has occurred"), strerror(errno) );
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
|
||||
_("Unable to access"), buf);
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
if ( !S_ISDIR(stat_p.st_mode) ) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name,
|
||||
buf, _("already exists, but is not a directory."));
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
if ( !(stat_p.st_mode & S_IWUSR) ) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
|
||||
buf, _("Output directory already exists, but is not writable."));
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(buf, ".") != 0) {
|
||||
@ -233,7 +231,7 @@ static void pnm_mkdir(char *buf, int verbose) {
|
||||
_("This error has occurred"), strerror(errno) );
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name,
|
||||
buf, _("Unable to create output directory."));
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
} /* end switch */
|
||||
} else if ( verbose ) {
|
||||
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name,
|
||||
@ -437,7 +435,7 @@ static void pnm_write_image(mp_image_t *mpi)
|
||||
|
||||
if (!mpi) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: No image data supplied to video output driver\n", info.short_name );
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Start writing to new subdirectory after a certain amount of frames */
|
||||
@ -469,7 +467,7 @@ static void pnm_write_image(mp_image_t *mpi)
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
|
||||
info.short_name, "This error has occurred",
|
||||
strerror(errno) );
|
||||
exit_player_bad(_("Fatal error"));
|
||||
return;
|
||||
}
|
||||
|
||||
pnm_write_pnm(outfile, mpi);
|
||||
|
Loading…
Reference in New Issue
Block a user