summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-09-05 17:54:09 +0000
committerivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-09-05 17:54:09 +0000
commit0b90eb2a029d2d2bc796136aeebb2bafb48d1b85 (patch)
tree50247c697543d10e4b82d745517ee8dcbd60993e
parent22a31d2fee6d197210e02c323d4dcee7c39ec582 (diff)
downloadmpv-0b90eb2a029d2d2bc796136aeebb2bafb48d1b85.tar.bz2
mpv-0b90eb2a029d2d2bc796136aeebb2bafb48d1b85.tar.xz
Some minor vo_jpeg fixes:
Removed unused variable dst. MPlayer now exits if it is unable to create a file for JPEG output and prints an appropriate message, instead of going on if all is right (which is not). Added line to authors file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13253 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--AUTHORS1
-rw-r--r--help/help_mp-en.h1
-rw-r--r--libvo/vo_jpeg.c9
3 files changed, 9 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index eacd286827..f0c0e216e7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -661,6 +661,7 @@ Vajna, Miklós (VMiklos) <mamajom@axelero.hu>
van Poorten, Ivo (ivop) <ivop@euronet.nl>
* multiple directory support for vo_jpeg
+ * vo_jpeg suboptions parser
Verdejo Pinochet, Reynaldo H. (reynaldo) <reynaldo@opendot.cl>
* improved EDL support
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index 2649dc0c9e..1171ee2c2a 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -757,6 +757,7 @@ static char help_text[]=
#define MSGTR_VO_JPEG_DirExistsButNotWritable "Output directory already exists, but is not writable."
#define MSGTR_VO_JPEG_DirExistsAndIsWritable "Output directory already exists and is writable."
#define MSGTR_VO_JPEG_CantCreateDirectory "Unable to create ouput directory."
+#define MSGTR_VO_JPEG_CantCreateFile "Unable to create output file."
#define MSGTR_VO_JPEG_DirectoryCreateSuccess "Output directory successfully created."
#define MSGTR_VO_JPEG_ParsingSuboptions "Parsing suboptions."
#define MSGTR_VO_JPEG_SuboptionsParsedOK "Suboptions parsed OK."
diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c
index 0b40c14b8a..aa3b328a27 100644
--- a/libvo/vo_jpeg.c
+++ b/libvo/vo_jpeg.c
@@ -10,6 +10,7 @@
* 2003-04-25 Spring cleanup -- Alex
* 2004-08-04 Added multiple subdirectory support -- Ivo (ivop@euronet.nl)
* 2004-09-01 Cosmetics update -- Ivo
+ * 2004-09-05 Added suboptions parser -- Ivo
*
*/
@@ -147,7 +148,12 @@ static uint32_t jpeg_write(uint8_t * name, uint8_t * buffer)
if ( !buffer ) return 1;
if ( (outfile = fopen(name, "wb") ) == NULL ) {
- return 1;
+ mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name,
+ MSGTR_VO_JPEG_CantCreateFile);
+ mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
+ info.short_name, MSGTR_VO_JPEG_GenericError,
+ strerror(errno) );
+ exit_player(MSGTR_Exit_error);
}
cinfo.err = jpeg_std_error(&jerr);
@@ -189,7 +195,6 @@ static uint32_t draw_frame(uint8_t *src[])
{
static uint32_t framecounter = 0, subdircounter = 0;
char buf[BUFLENGTH];
- uint8_t *dst = src[0];
static char subdirname[BUFLENGTH] = "";
struct stat stat_p;