annotate libmpdvdkit2/error.c @ 13252:7dfd84faaa09

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.
author ivo
date Sun, 05 Sep 2004 17:54:09 +0000
parents f23c35ce0d16
children c2ddedd0619e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
1 /*****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
2 * error.c: error management functions
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
3 *****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
4 * Copyright (C) 1998-2002 VideoLAN
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
5 * $Id$
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
6 *
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
7 * Author: Samuel Hocevar <sam@zoy.org>
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
8 *
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
12 * (at your option) any later version.
9333
f0f0f176d298 sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents: 7033
diff changeset
13 *
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
17 * GNU General Public License for more details.
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
18 *
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
22 *****************************************************************************/
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
23
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
24 #include "config.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
25
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
26 #include <stdio.h>
10720
f23c35ce0d16 synced to libdvdcss 1.2.8 (except the DVDCSS_PATH guessing, we use our
arpi
parents: 9333
diff changeset
27 #include <stdlib.h>
9333
f0f0f176d298 sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents: 7033
diff changeset
28 #include <limits.h>
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
29
7033
596919e4f601 apply mplayer-specific patches
arpi
parents: 7027
diff changeset
30 #include "dvdcss.h"
7027
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
31
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
32 #include "common.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
33 #include "css.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
34 #include "libdvdcss.h"
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
35
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
36 /*****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
37 * Error messages
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
38 *****************************************************************************/
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
39 void _dvdcss_error( dvdcss_t dvdcss, char *psz_string )
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
40 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
41 if( dvdcss->b_errors )
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
42 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
43 fprintf( stderr, "libdvdcss error: %s\n", psz_string );
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
44 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
45
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
46 dvdcss->psz_error = psz_string;
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
47 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
48
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
49 /*****************************************************************************
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
50 * Debug messages
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
51 *****************************************************************************/
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
52 void _dvdcss_debug( dvdcss_t dvdcss, char *psz_string )
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
53 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
54 if( dvdcss->b_debug )
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
55 {
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
56 fprintf( stderr, "libdvdcss debug: %s\n", psz_string );
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
57 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
58 }
c9a4dfaa9868 importing libdvdcss 1.2.2 files
arpi
parents:
diff changeset
59