summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-10 16:11:05 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-10 16:11:05 +0000
commitbc3f44f6677751482a3d4f4d4b885ba6beac4c58 (patch)
tree69ff615bd7f1a35db5d53e94514312275de9b133 /src
parent5565e0dd6dfbd1a160ecbdd2c84af0dc5d279d93 (diff)
downloadxine-lib-bc3f44f6677751482a3d4f4d4b885ba6beac4c58.tar.gz
xine-lib-bc3f44f6677751482a3d4f4d4b885ba6beac4c58.tar.bz2
new patches from Frantisek, cdda fixes/improvements
CVS patchset: 5268 CVS date: 2003/08/10 16:11:05
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_cdda.c19
-rw-r--r--src/input/input_cdda.c4
2 files changed, 11 insertions, 12 deletions
diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c
index c0da5d57f..1c6e63394 100644
--- a/src/demuxers/demux_cdda.c
+++ b/src/demuxers/demux_cdda.c
@@ -24,7 +24,7 @@
* linear PCM "decoder" (which in turn sends them directly to the audio
* output target; this is a really fancy CD-playing architecture).
*
- * $Id: demux_cdda.c,v 1.10 2003/07/25 21:02:05 miguelfreitas Exp $
+ * $Id: demux_cdda.c,v 1.11 2003/08/10 16:11:05 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -71,9 +71,12 @@ typedef struct {
static int demux_cdda_send_chunk (demux_plugin_t *this_gen) {
demux_cdda_t *this = (demux_cdda_t *) this_gen;
buf_element_t *buf = NULL;
+ uint32_t blocksize;
+ blocksize = this->input->get_blocksize(this->input);
+ if (!blocksize) blocksize = 2352;
buf = this->input->read_block(this->input, this->audio_fifo,
- this->input->get_blocksize(this->input));
+ blocksize);
if (!buf) {
this->status = DEMUX_FINISHED;
return this->status;
@@ -108,7 +111,7 @@ static void demux_cdda_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_SEEKABLE] = 1;
+ this->stream->stream_info[XINE_STREAM_INFO_SEEKABLE] = INPUT_IS_SEEKABLE(this->input);
this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 2;
@@ -181,12 +184,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
demux_cdda_t *this;
- if (!INPUT_IS_SEEKABLE(input)) {
- xprintf(stream->xine, XINE_VERBOSITY_DEBUG,
- _("input not seekable, can not handle!\n"));
- return NULL;
- }
-
this = xine_xmalloc (sizeof (demux_cdda_t));
this->stream = stream;
this->input = input;
@@ -208,7 +205,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
switch (stream->content_detection_method) {
case METHOD_BY_CONTENT:
- case METHOD_EXPLICIT:
case METHOD_BY_EXTENSION:
if (strncasecmp (input->get_mrl (input), "cdda:", 5)) {
free (this);
@@ -217,6 +213,9 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
break;
+ case METHOD_EXPLICIT:
+ break;
+
default:
free (this);
return NULL;
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c
index 847741b46..59a0fda71 100644
--- a/src/input/input_cdda.c
+++ b/src/input/input_cdda.c
@@ -20,7 +20,7 @@
* Compact Disc Digital Audio (CDDA) Input Plugin
* by Mike Melanson (melanson@pcisys.net)
*
- * $Id: input_cdda.c,v 1.30 2003/06/09 09:55:20 tchamp Exp $
+ * $Id: input_cdda.c,v 1.31 2003/08/10 16:11:05 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -2161,7 +2161,7 @@ static buf_element_t *cdda_plugin_read_block (input_plugin_t *this_gen, fifo_buf
if (nlen != CD_RAW_FRAME_SIZE)
return NULL;
- if (this->current_frame >= this->last_frame)
+ if (this->current_frame > this->last_frame)
return NULL;
/* populate frame cache */