summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/combined/decoder_flac.c25
-rw-r--r--src/input/input_cdda.c3
-rw-r--r--src/libfaad/xine_faad_decoder.c11
-rw-r--r--src/libxineadec/xine_vorbis_decoder.c4
-rw-r--r--src/xine-engine/buffer.h4
-rw-r--r--src/xine-engine/buffer_types.c4
-rw-r--r--src/xine-utils/attributes.h4
8 files changed, 27 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac
index c82876823..1e1477de3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1624,7 +1624,7 @@ dnl cdrom ioctls
dnl ---------------------------------------------
AC_CHECK_HEADERS([linux/cdrom.h sys/dvdio.h], [break])
-AC_CHECK_HEADERS([sys/cdio.h])
+AC_CHECK_HEADERS([sys/cdio.h sys/scsiio.h])
AM_CHECK_CDROM_IOCTLS(
[AC_DEFINE(HAVE_CDROM_IOCTLS,1,[Define this if you have CDROM ioctls])],
[AC_MSG_RESULT([*** (S)VCD support will be disabled ***])])
diff --git a/src/combined/decoder_flac.c b/src/combined/decoder_flac.c
index 9b77cc27d..52fbde49f 100644
--- a/src/combined/decoder_flac.c
+++ b/src/combined/decoder_flac.c
@@ -59,23 +59,17 @@ typedef struct flac_decoder_s {
int64_t pts;
- int output_sampling_rate;
- int output_open;
- int output_mode;
-
xine_stream_t *stream;
FLAC__StreamDecoder *flac_decoder;
- int sample_rate;
- int bits_per_sample;
- int channels;
-
unsigned char *buf;
int buf_size;
int buf_pos;
int min_size;
+ int output_open;
+
} flac_decoder_t;
/*
@@ -249,21 +243,18 @@ flac_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
*/
if (buf->decoder_flags & BUF_FLAG_STDHEADER)
{
- int mode = AO_CAP_MODE_MONO;
-
- this->sample_rate = buf->decoder_info[1];
- this->bits_per_sample = buf->decoder_info[2];
- this->channels = buf->decoder_info[3];
-
- mode = _x_ao_channels2mode(this->channels);
+ const int sample_rate = buf->decoder_info[1];
+ const int bits_per_sample = buf->decoder_info[2];
+ const int channels = buf->decoder_info[3];
+ const int mode = _x_ao_channels2mode(channels);
if (!this->output_open)
{
this->output_open = this->stream->audio_out->open (
this->stream->audio_out,
this->stream,
- this->bits_per_sample,
- this->sample_rate,
+ bits_per_sample,
+ sample_rate,
mode);
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c
index fe4c7f932..80f0bda39 100644
--- a/src/input/input_cdda.c
+++ b/src/input/input_cdda.c
@@ -621,7 +621,10 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/cdio.h>
+
+#ifdef HAVE_SYS_SCSIIO_H
#include <sys/scsiio.h>
+#endif
static int read_cdrom_toc(int fd, cdrom_toc *toc) {
diff --git a/src/libfaad/xine_faad_decoder.c b/src/libfaad/xine_faad_decoder.c
index aa528a34d..169874a44 100644
--- a/src/libfaad/xine_faad_decoder.c
+++ b/src/libfaad/xine_faad_decoder.c
@@ -75,7 +75,6 @@ typedef struct faad_decoder_s {
int bits_per_sample;
unsigned char num_channels;
int sbr;
- uint32_t ao_cap_mode;
int output_open;
@@ -177,16 +176,18 @@ static int faad_open_dec( faad_decoder_t *this ) {
}
static int faad_open_output( faad_decoder_t *this ) {
+ int ao_cap_mode;
+
this->rec_audio_src_size = this->num_channels * FAAD_MIN_STREAMSIZE;
switch( this->num_channels ) {
case 1:
- this->ao_cap_mode=AO_CAP_MODE_MONO;
+ ao_cap_mode=AO_CAP_MODE_MONO;
break;
case 6:
if(this->stream->audio_out->get_capabilities(this->stream->audio_out) &
AO_CAP_MODE_5_1CHANNEL) {
- this->ao_cap_mode = AO_CAP_MODE_5_1CHANNEL;
+ ao_cap_mode = AO_CAP_MODE_5_1CHANNEL;
break;
} else {
this->faac_cfg = NeAACDecGetCurrentConfiguration(this->faac_dec);
@@ -195,7 +196,7 @@ static int faad_open_output( faad_decoder_t *this ) {
this->num_channels = 2;
}
case 2:
- this->ao_cap_mode=AO_CAP_MODE_STEREO;
+ ao_cap_mode=AO_CAP_MODE_STEREO;
break;
}
@@ -203,7 +204,7 @@ static int faad_open_output( faad_decoder_t *this ) {
this->stream,
this->bits_per_sample,
this->rate,
- this->ao_cap_mode) ;
+ ao_cap_mode) ;
return this->output_open;
}
diff --git a/src/libxineadec/xine_vorbis_decoder.c b/src/libxineadec/xine_vorbis_decoder.c
index ef8575949..7fc1b9197 100644
--- a/src/libxineadec/xine_vorbis_decoder.c
+++ b/src/libxineadec/xine_vorbis_decoder.c
@@ -91,8 +91,8 @@ static void vorbis_discontinuity (audio_decoder_t *this_gen) {
}
/* Known vorbis comment keys from ogg123 sources*/
-static struct {
- char *key; /* includes the '=' for programming convenience */
+static const struct {
+ const char *key; /* includes the '=' for programming convenience */
int xine_metainfo_index;
} vorbis_comment_keys[] = {
{"ARTIST=", XINE_META_INFO_ARTIST},
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 29eacc3c1..ca25dc531 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -655,7 +655,7 @@ uint32_t _x_fourcc_to_buf_video( uint32_t fourcc_int ) XINE_PROTECTED;
* @param buf_type One of the \ref buffer_video "BUF_VIDEO_xxx" values.
* @sa _x_buf_audio_name
*/
-char * _x_buf_video_name( uint32_t buf_type ) XINE_PROTECTED;
+const char *_x_buf_video_name( uint32_t buf_type ) XINE_PROTECTED;
/**
* @brief Returns the \ref buffer_audio "BUF_AUDIO_xxx" for the given formattag.
@@ -669,7 +669,7 @@ uint32_t _x_formattag_to_buf_audio( uint32_t formattag ) XINE_PROTECTED;
* @param buf_type One of the \ref buffer_audio "BUF_AUDIO_xxx" values.
* @sa _x_buf_video_name
*/
-char * _x_buf_audio_name( uint32_t buf_type ) XINE_PROTECTED;
+const char *_x_buf_audio_name( uint32_t buf_type ) XINE_PROTECTED;
/**
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index c5e3294f3..f686f61a1 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -1137,7 +1137,7 @@ static uint32_t cached_buf_type=0;
return 0;
}
-char * _x_buf_video_name( uint32_t buf_type ) {
+const char *_x_buf_video_name( uint32_t buf_type ) {
int i;
buf_type &= 0xffff0000;
@@ -1171,7 +1171,7 @@ static uint32_t cached_buf_type=0;
return 0;
}
-char * _x_buf_audio_name( uint32_t buf_type ) {
+const char *_x_buf_audio_name( uint32_t buf_type ) {
int i;
buf_type &= 0xffff0000;
diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h
index 80bcadd7f..280fd3685 100644
--- a/src/xine-utils/attributes.h
+++ b/src/xine-utils/attributes.h
@@ -1,8 +1,10 @@
/*
* attributes.h
* Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
+ * Copyright (C) 2001-2007 xine developers
*
- * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
+ * This file was originally part of mpeg2dec, a free MPEG-2 video stream
+ * decoder.
*
* mpeg2dec is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by