From ad7e0f22ba57690d69016d27c05484e87c0ef28e Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Wed, 22 Apr 2009 18:30:00 +0000 Subject: Demux timing fixes (Windows) m4/pthreads.m4 * Mingw GCC says that '-pthread' option is unknown. * Correct library name under Mingw is -lpthreadGC2. src/xine-engine/demux.c * function _x_compute_interval cannot be compiled --- src/xine-engine/demux.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 698b44988..158e0706f 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -122,10 +122,22 @@ void _x_demux_flush_engine (xine_stream_t *stream) { static struct timespec _x_compute_interval(unsigned int millisecs) { struct timespec ts; +#ifdef WIN32 + FILETIME ft; + ULARGE_INTEGER ui; + + GetSystemTimeAsFileTime(&ft); + ui.u.LowPart = ft.dwLowDateTime; + ui.u.HighPart = ft.dwHighDateTime; + ui.QuadPart += millisecs * 10000; + ts.tv_sec = ui.QuadPart / 10000000; + ts.tv_sec = (ui.QuadPart % 10000000)*100; +#else clock_gettime(CLOCK_REALTIME, &ts); uint64_t ttimer = (uint64_t)ts.tv_sec*1000 + ts.tv_nsec/1000000 + millisecs; ts.tv_sec = ttimer/1000; ts.tv_nsec = (ttimer%1000)*1000000; +#endif return ts; } -- cgit v1.2.3 From d0fa9a58b4d346ba9ffde31c03fa8a9d437915db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Dequ=C3=A8nes=20=28Duck=29?= Date: Thu, 28 May 2009 21:34:47 +0100 Subject: Fix FTBFS on the Hurd. --- src/input/input_dvd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 279f3c64e..4f8827dbd 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -53,7 +53,9 @@ #include #ifndef WIN32 +#if ! defined(__GNU__) #include +#endif #include #include -- cgit v1.2.3 From 9a4144f50bb391cc0e4c93cb053435a453fdf821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Dequ=C3=A8nes=20=28Duck=29?= Date: Thu, 28 May 2009 21:34:52 +0100 Subject: Fix a recently-added POSIX incompatibility. --- src/audio_out/audio_pulse_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index 4b66fbaed..d4d19ce1b 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -235,7 +235,7 @@ static int connect_context(pulse_driver_t *this) { } if (!this->context) { - char fn[PATH_MAX], *p; + char fn[XINE_PATH_MAX], *p; if (pa_get_binary_name(fn, sizeof(fn))) p = pa_path_get_filename(fn); -- cgit v1.2.3 From e559c4abdd23b9e41922329b73909acbacbcdffc Mon Sep 17 00:00:00 2001 From: Scott Bigham Date: Sun, 31 May 2009 20:50:13 -0400 Subject: Fix seeking in large raw DV files start_pos is of type off_t, and since we compile with D_FILE_OFFSET_BITS=64, -off_t is a 64-bit long long int, so you'd think we'd be fine here -- but we aren't, because start_time, this->duration and this->frame_size are all 32-bit ints, which means that the computed seek position gets truncated to 32 bits before it's assigned to start_pos. The simple solution is to cast start_time to off_t, expanding the computation to 64 bits in time to avoid truncation. --- src/demuxers/demux_rawdv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c index 86f777ec6..d95fc9125 100644 --- a/src/demuxers/demux_rawdv.c +++ b/src/demuxers/demux_rawdv.c @@ -302,7 +302,8 @@ static int demux_raw_dv_seek (demux_plugin_t *this_gen, } if( !start_pos && start_time ) { - start_pos = (start_time * 90 / this->duration) * this->frame_size; + /* Upcast start_time in case sizeof(off_t) > sizeof(int) */ + start_pos = ((off_t) start_time * 90 / this->duration) * this->frame_size; } start_pos = start_pos - (start_pos % this->frame_size); -- cgit v1.2.3 From 5c87eda95d1cab1a43e5118070d506077be09fcf Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sun, 7 Jun 2009 14:49:46 +0200 Subject: Fix _x_compute_interval for OS X. The new _x_compute_interval functions uses clock_gettime() which is not provided on OS X. If _POSIX_TIMERS is not defined, use the older gettimeofday(). --- src/xine-engine/demux.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 158e0706f..98b2e3fd3 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -132,11 +132,17 @@ static struct timespec _x_compute_interval(unsigned int millisecs) { ui.QuadPart += millisecs * 10000; ts.tv_sec = ui.QuadPart / 10000000; ts.tv_sec = (ui.QuadPart % 10000000)*100; -#else +#elif _POSIX_TIMERS > 0 clock_gettime(CLOCK_REALTIME, &ts); uint64_t ttimer = (uint64_t)ts.tv_sec*1000 + ts.tv_nsec/1000000 + millisecs; ts.tv_sec = ttimer/1000; ts.tv_nsec = (ttimer%1000)*1000000; +#else + struct timeval tv; + gettimeofday(&tv, NULL); + uint64_t ttimer = (uint64_t)tv.tv_sec*1000 + tv.tv_usec/1000 + millisecs; + ts.tv_sec = ttimer/1000; + ts.tv_nsec = (ttimer%1000)*1000000; #endif return ts; } -- cgit v1.2.3 From 9c52993b10c3c9318d3a37e0ba2a3b83e03d4ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Thu, 11 Jun 2009 14:44:07 +0200 Subject: Add some missing BUF_FLAG_PREVIEW in preview_mode. --HG-- extra : transplant_source : %F5K%AE%D3f%EFQ%F5U%E5%FE%BB%1E.%2Beh%C5%20%7F --- src/demuxers/demux_mpeg_pes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index b7c0e7e6d..9715e1254 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -1173,7 +1173,7 @@ static int32_t parse_video_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_elemen b->size = 0; b->pts = 0; b->type = buf_type; - b->decoder_flags = BUF_FLAG_FRAME_END; + b->decoder_flags = BUF_FLAG_FRAME_END | (this->preview_mode ? BUF_FLAG_PREVIEW : 0); this->video_fifo->put (this->video_fifo, b); } } @@ -1187,7 +1187,7 @@ static int32_t parse_video_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_elemen if (this->mpeg12_h264_detected & 1) { uint8_t *t = buf->content + buf->size; if (buf->size >=4 && t[-1] == 10 && t[-2] == 0x01 && t[-3] == 0x00 && t[-4] == 0x00) /* end of sequence */ - buf->decoder_flags = BUF_FLAG_FRAME_END; + buf->decoder_flags = BUF_FLAG_FRAME_END | (this->preview_mode ? BUF_FLAG_PREVIEW : 0); } } else { buf->size = buf->max_size - result; @@ -1225,7 +1225,7 @@ static int32_t parse_video_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_elemen if ((this->mpeg12_h264_detected & 1) && todo_length <= 0) { uint8_t *t = buf->content + buf->size; if (buf->size >= 4 && t[-1] == 10 && t[-2] == 0x01 && t[-3] == 0x00 && t[-4] == 0x00) /* end of sequence */ - buf->decoder_flags = BUF_FLAG_FRAME_END; + buf->decoder_flags = BUF_FLAG_FRAME_END | (this->preview_mode ? BUF_FLAG_PREVIEW : 0); } this->video_fifo->put (this->video_fifo, buf); -- cgit v1.2.3 From c5c9c8df31e9703a0b2991eca7cc16cafbaee180 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 21 Jun 2009 21:41:46 +0100 Subject: No DVB support on Hurd. --- src/input/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 8e9c9385d..998fc6c81 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -46,6 +46,9 @@ endif if WIN32 else in_rtp = xineplug_inp_rtp.la +endif + +if DVB in_dvb = xineplug_inp_dvb.la endif -- cgit v1.2.3 From b998e150f93c4c0f680eec4f74beb61b229e296f Mon Sep 17 00:00:00 2001 From: Yavor Doganov Date: Wed, 15 Jul 2009 16:56:21 +0100 Subject: Port to new libmpcdec API This is an incomplete patch porting xine-lib to the new libmpcdec API. Incomplete, because 1) no SV8 support and 2) still no seeking. --- src/libmusepack/xine_musepack_decoder.c | 74 +++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'src') diff --git a/src/libmusepack/xine_musepack_decoder.c b/src/libmusepack/xine_musepack_decoder.c index 1454b32f9..5977abd63 100644 --- a/src/libmusepack/xine_musepack_decoder.c +++ b/src/libmusepack/xine_musepack_decoder.c @@ -47,6 +47,8 @@ #ifdef HAVE_MPCDEC_MPCDEC_H # include +#elif defined(HAVE_MPC_MPCDEC_H) +# include #else # include "musepack/musepack.h" #endif @@ -78,7 +80,11 @@ typedef struct mpc_decoder_s { mpc_reader reader; mpc_streaminfo streaminfo; +#ifndef HAVE_MPC_MPCDEC_H mpc_decoder decoder; +#else + mpc_demux *decoder; +#endif int decoder_ok; unsigned int current_frame; @@ -93,8 +99,13 @@ typedef struct mpc_decoder_s { *************************************************************************/ /* Reads size bytes of data into buffer at ptr. */ +#ifndef HAVE_MPC_MPCDEC_H static int32_t mpc_reader_read(void *data, void *ptr, int size) { mpc_decoder_t *this = (mpc_decoder_t *) data; +#else +static int32_t mpc_reader_read(mpc_reader *data, void *ptr, int size) { + mpc_decoder_t *this = (mpc_decoder_t *) data->data; +#endif lprintf("mpc_reader_read: size=%d\n", size); @@ -112,8 +123,13 @@ static int32_t mpc_reader_read(void *data, void *ptr, int size) { } /* Seeks to byte position offset. */ +#ifndef HAVE_MPC_MPCDEC_H static mpc_bool_t mpc_reader_seek(void *data, int32_t offset) { mpc_decoder_t *this = (mpc_decoder_t *) data; +#else +static mpc_bool_t mpc_reader_seek(mpc_reader *data, int32_t offset) { + mpc_decoder_t *this = (mpc_decoder_t *) data->data; +#endif lprintf("mpc_reader_seek: offset=%d\n", offset); @@ -121,11 +137,19 @@ static mpc_bool_t mpc_reader_seek(void *data, int32_t offset) { * that the buffer starts at the start of the file */ this->read = offset; +#ifndef HAVE_MPC_MPCDEC_H return TRUE; +#else + return MPC_TRUE; +#endif } /* Returns the current byte offset in the stream. */ +#ifndef HAVE_MPC_MPCDEC_H static int32_t mpc_reader_tell(void *data) { +#else +static int32_t mpc_reader_tell(mpc_reader *data) { +#endif lprintf("mpc_reader_tell\n"); /* Tell isn't used so just return 0 */ @@ -133,8 +157,13 @@ static int32_t mpc_reader_tell(void *data) { } /* Returns the total length of the source stream, in bytes. */ +#ifndef HAVE_MPC_MPCDEC_H static int32_t mpc_reader_get_size(void *data) { mpc_decoder_t *this = (mpc_decoder_t *) data; +#else +static int32_t mpc_reader_get_size(mpc_reader *data) { + mpc_decoder_t *this = (mpc_decoder_t *) data->data; +#endif lprintf("mpc_reader_get_size\n"); @@ -142,10 +171,17 @@ static int32_t mpc_reader_get_size(void *data) { } /* True if the stream is a seekable stream. */ +#ifndef HAVE_MPC_MPCDEC_H static mpc_bool_t mpc_reader_canseek(void *data) { lprintf("mpc_reader_canseek\n"); return TRUE; +#else +static mpc_bool_t mpc_reader_canseek(mpc_reader *data) { + + lprintf("mpc_reader_canseek\n"); + return MPC_TRUE; +#endif } /* Convert 32bit float samples into 16bit int samples */ @@ -165,10 +201,19 @@ static inline void float_to_int(float *_f, int16_t *s16, int samples) { static int mpc_decode_frame (mpc_decoder_t *this) { float buffer[MPC_DECODER_BUFFER_LENGTH]; uint32_t frames; +#ifdef HAVE_MPC_MPCDEC_H + mpc_frame_info frame; +#endif lprintf("mpd_decode_frame\n"); +#ifndef HAVE_MPC_MPCDEC_H frames = mpc_decoder_decode(&this->decoder, buffer, 0, 0); +#else + frame.buffer = buffer; + mpc_demux_decode(this->decoder, &frame); + frames = frame.samples; +#endif if (frames > 0) { audio_buffer_t *audio_buffer; @@ -235,6 +280,16 @@ static void mpc_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { xine_fast_memcpy(this->buf, buf->content, buf->size); this->size = buf->size; +#ifdef HAVE_MPC_MPCDEC_H + this->decoder = mpc_demux_init(&this->reader); + if (!this->decoder) { + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + _("libmusepack: mpc_demux_init failed.\n")); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0); + return; + } + mpc_demux_get_info(this->decoder, &this->streaminfo); +#else /* Initialise and read stream info */ mpc_streaminfo_init(&this->streaminfo); @@ -245,6 +300,7 @@ static void mpc_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0); return; } +#endif this->sample_rate = this->streaminfo.sample_freq; this->channels = this->streaminfo.channels; @@ -259,7 +315,9 @@ static void mpc_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->current_frame = 0; /* Setup the decoder */ +#ifndef HAVE_MPC_MPCDEC_H mpc_decoder_setup(&this->decoder, &this->reader); +#endif this->decoder_ok = 0; /* Take this opportunity to initialize stream/meta information */ @@ -312,7 +370,11 @@ static void mpc_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { /* Time to decode */ if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* Increment frame count */ +#ifndef HAVE_MPC_MPCDEC_H if (this->current_frame++ == this->streaminfo.frames) { +#else + if (this->current_frame++ == this->streaminfo.samples) { +#endif xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("libmusepack: data after last frame ignored\n")); return; @@ -323,7 +385,11 @@ static void mpc_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { if ((this->size - this->read) >= MPC_DECODER_MEMSIZE) { lprintf("initialise"); +#ifndef HAVE_MPC_MPCDEC_H if (!mpc_decoder_initialize(&this->decoder, &this->streaminfo)) { +#else + if (!this->decoder) { +#endif xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("libmusepack: mpc_decoder_initialise failed\n")); @@ -354,7 +420,11 @@ static void mpc_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { /* If we are at the end of the stream we decode the remaining frames as we * know we'll have enough data */ +#ifndef HAVE_MPC_MPCDEC_H if (this->current_frame == this->streaminfo.frames) { +#else + if (this->current_frame == this->streaminfo.samples) { +#endif lprintf("flushing buffers\n"); do { @@ -392,6 +462,10 @@ static void mpc_dispose (audio_decoder_t *this_gen) { /* free anything that was allocated during operation */ if (this->buf) free(this->buf); +#ifdef HAVE_MPC_MPCDEC_H + if (this->decoder) + mpc_demux_exit(this->decoder); +#endif free(this); } -- cgit v1.2.3 From adc3be40b090e93d5f612a4f9e90965cc8618692 Mon Sep 17 00:00:00 2001 From: Sander Jansen Date: Thu, 7 May 2009 10:39:18 -0500 Subject: Character encoding is stored in LC_CTYPE --- src/xine-utils/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 689b68502..c3281f369 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -564,7 +564,7 @@ char *xine_get_system_encoding(void) { char *codeset = NULL; #ifdef HAVE_NL_LANGINFO - setlocale(LC_ALL, ""); + setlocale(LC_CTYPE, ""); codeset = nl_langinfo(CODESET); #endif /* -- cgit v1.2.3 From 2ef118731d37ec897d143ae69715c190d2774861 Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Wed, 5 Aug 2009 19:07:43 +0100 Subject: Accept CDDB return code 211 ("found inexact matches") This code is returned when there is more than one CDDB entry for the disc in question. Before, when receiving a 211 response from a CDDB server, Xine would simply not display any CDDB information. Now one of the responses is displayed, on the theory that something is better than nothing. --- src/input/input_cdda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index c1cfb3d67..33ba0b299 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -1729,7 +1729,7 @@ static int _cdda_cddb_retrieve(cdda_input_plugin_t *this) { memset(&buffer, 0, sizeof(buffer)); err = _cdda_cddb_socket_read(this, buffer, sizeof(buffer) - 1); - if (err < 0 || (((err = _cdda_cddb_handle_code(buffer)) != 200) && (err != 210))) { + if (err < 0 || (((err = _cdda_cddb_handle_code(buffer)) != 200) && (err != 210) && (err != 211))) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "input_cdda: cddb query command returned error code '%03d'.\n", err); _cdda_cddb_socket_close(this); @@ -1750,7 +1750,7 @@ static int _cdda_cddb_retrieve(cdda_input_plugin_t *this) { } } - if (err == 210) { + if ((err == 210) || (err == 211)) { memset(&buffer, 0, sizeof(buffer)); err = _cdda_cddb_socket_read(this, buffer, sizeof(buffer) - 1); if (err < 0) { -- cgit v1.2.3 From 9ef1fab0025505f09e135789f4bec80b48850c84 Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Wed, 5 Aug 2009 19:15:49 +0100 Subject: Fix reading of CDDB information (ref. cset a470c338149c) This fixes the reading of CDDB information by not setting INPUT_CAP_BLOCK for the CDDA plugin (and therefore also setting CD_RAW_FRAME_SIZE to 0), and allow reading in non-block sized chunks as per http://hg.debian.org/hg/xine-lib/xine-lib?cmd=changeset;node=a470c338149c;style=gitweb Explanation: At some point a number of releases ago, a codepath in Xine related to the reading of block devices which had been bypassed was fixed, which meant that when certain frontends asked Xine to provide CDDB information for a disc, querying the name, length, etc. of each track, Xine would actually cause a seek to the starting block of each track, which meant that before starting to play, the player would pause for 5-10 seconds, seeking through each track. This is unnecessary, since Xine should have simply used the CD TOC information from the CD audio header at the start of the disc. Other frontends handle CDDB differently and don't query Xine for information track by track, and so never triggered this problem. But for those with the problem, it made loading a disc rather slow. It turns out that the root of the problem is that the CDDA plugin shouldn't be setting INPUT_CAP_BLOCK, since Audio CDs are not block devices _in the sense that Xine intends_. Simply turning this off fixes the problem, with no other side effects (tested locally, for some time now, on xine-ui, kscd, kaffeine, amarok, etc.). This change pairs nicely with a patch originally committed years ago (cset a470c338149c) but which was reverted as it inadvertently triggered the same problem as is now (properly) fixed by the simple above-mentioned change. Now that a better fix is in, it can be re-committed. --- src/input/input_cdda.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 33ba0b299..70bd34f35 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -2158,26 +2158,18 @@ static int cdda_close(cdda_input_plugin_t *this_gen) { static uint32_t cdda_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_SEEKABLE | INPUT_CAP_BLOCK; + return INPUT_CAP_SEEKABLE; } static off_t cdda_plugin_read (input_plugin_t *this_gen, char *buf, off_t len) { - /* only allow reading in block-sized chunks */ - - return 0; -} - -static buf_element_t *cdda_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, - off_t nlen) { - cdda_input_plugin_t *this = (cdda_input_plugin_t *) this_gen; - buf_element_t *buf; - unsigned char frame_data[CD_RAW_FRAME_SIZE]; int err = 0; - if (nlen != CD_RAW_FRAME_SIZE) + /* only allow reading in block-sized chunks */ + + if (len != CD_RAW_FRAME_SIZE) return 0; if (this->current_frame > this->last_frame) @@ -2211,14 +2203,26 @@ static buf_element_t *cdda_plugin_read_block (input_plugin_t *this_gen, fifo_buf if( err < 0 ) return 0; - memcpy(frame_data, this->cache[this->current_frame-this->cache_first], CD_RAW_FRAME_SIZE); + memcpy(buf, this->cache[this->current_frame-this->cache_first], CD_RAW_FRAME_SIZE); this->current_frame++; + return CD_RAW_FRAME_SIZE; +} + +static buf_element_t *cdda_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, + off_t nlen) { + + buf_element_t *buf; + buf = fifo->buffer_pool_alloc(fifo); buf->content = buf->mem; buf->type = BUF_DEMUX_BLOCK; - buf->size = CD_RAW_FRAME_SIZE; - memcpy(buf->mem, frame_data, CD_RAW_FRAME_SIZE); + + buf->size = cdda_plugin_read(this_gen, buf->content, nlen); + if (buf->size == 0) { + buf->free_buffer(buf); + buf = NULL; + } return buf; } @@ -2256,7 +2260,7 @@ static off_t cdda_plugin_get_length (input_plugin_t *this_gen) { static uint32_t cdda_plugin_get_blocksize (input_plugin_t *this_gen) { - return CD_RAW_FRAME_SIZE; + return 0; } static const char* cdda_plugin_get_mrl (input_plugin_t *this_gen) { -- cgit v1.2.3