summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Alasuutari2006-07-06 03:00:28 +0300
committerArwed v. Merkatz2006-07-18 19:54:18 +0200
commit293aa4c2ba2a65d1ce8797976bbf39ec52415288 (patch)
tree19de5bed185100eab200390cda5184d8c3c489f1
parent9a50a3b6e04f4fdf647de7c4e870508367af0e84 (diff)
Added patch to fix FLAC playback. Thanks a lot to Bearcat for the info!
(cherry picked from a2087b2e13b226299a41f031895309823343cbe0 commit)
-rwxr-xr-xvideo-libs/xine-lib/DETAILS2
-rw-r--r--video-libs/xine-lib/HISTORY5
-rwxr-xr-xvideo-libs/xine-lib/PRE_BUILD9
-rw-r--r--video-libs/xine-lib/xine_flac.diff54
4 files changed, 67 insertions, 3 deletions
diff --git a/video-libs/xine-lib/DETAILS b/video-libs/xine-lib/DETAILS
index fd4abfa4d9..5ae7b22d6b 100755
--- a/video-libs/xine-lib/DETAILS
+++ b/video-libs/xine-lib/DETAILS
@@ -7,7 +7,7 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
ENTERED=20010927
SOURCE_HASH=sha512:cb669a0b9ca4e3c5d4c4c8b156e26dab0a1dc0b48a5d73727f2d53a437560170820d81c6fd2a5ead21361eb645bda8e5c97017a6cf0019f70b0761b935cc4df1
LICENSE[0]=GPL
- PATCHLEVEL=1
+ PATCHLEVEL=2
KEYWORDS="player video libs"
SHORT="xine is a free video player."
cat << EOF
diff --git a/video-libs/xine-lib/HISTORY b/video-libs/xine-lib/HISTORY
index 0a35053023..3e12fe607d 100644
--- a/video-libs/xine-lib/HISTORY
+++ b/video-libs/xine-lib/HISTORY
@@ -1,3 +1,8 @@
+2006-07-06 Juuso Alasuutari <iuso@sourcemage.org>
+ * PRE_BUILD: Apply patch to fix flac playback. Thanks, Bearcat!
+ * xine_flac.diff: Added.
+ * DETAILS: PATCHLEVEL++
+
2006-07-05 Pol Vinogradov <vin.public@gmail.com>
* DETAILS: removed UPDATED
* DEPENDS: added optional depends on X11-LIBS, optonal depends on
diff --git a/video-libs/xine-lib/PRE_BUILD b/video-libs/xine-lib/PRE_BUILD
index 4fb801b917..213753cca5 100755
--- a/video-libs/xine-lib/PRE_BUILD
+++ b/video-libs/xine-lib/PRE_BUILD
@@ -1,6 +1,11 @@
default_pre_build &&
cd $SOURCE_DIRECTORY &&
+
# fix a typo (missing quoting) so detection of ffmpeg-cvs works correctly
# compiles but fails to run otherwise
-sedit 's/x$FFMPEG_POSTPROC_LIBS/"\0"/' configure &&
-sedit 's/$(FFMPEG_LIBS)/\0 $(FFMPEG_POSTPROC_LIBS)/' src/libffmpeg/Makefile.in
+sedit 's/x$FFMPEG_POSTPROC_LIBS/"\0"/' configure &&
+sedit 's/$(FFMPEG_LIBS)/\0 $(FFMPEG_POSTPROC_LIBS)/' \
+ src/libffmpeg/Makefile.in &&
+
+# apply patch to fix flac playback in xine-lib 1.1.1
+patch -p0 < $SCRIPT_DIRECTORY/xine_flac.diff
diff --git a/video-libs/xine-lib/xine_flac.diff b/video-libs/xine-lib/xine_flac.diff
new file mode 100644
index 0000000000..f253012d95
--- /dev/null
+++ b/video-libs/xine-lib/xine_flac.diff
@@ -0,0 +1,54 @@
+--- src/demuxers/demux_flac.c 2004-09-22 23:54:44.000000000 +0300
++++ src/demuxers/demux_flac.c.new 2006-07-06 02:36:47.000000000 +0300
+@@ -270,23 +270,36 @@
+ /* send start buffers */
+ _x_demux_control_start(this->stream);
+
+- if (this->audio_fifo) {
+- buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
+- buf->type = BUF_AUDIO_FLAC;
+- buf->decoder_flags = BUF_FLAG_HEADER|BUF_FLAG_STDHEADER|BUF_FLAG_FRAME_END;
+- buf->decoder_info[0] = 0;
+- buf->decoder_info[1] = this->sample_rate;
+- buf->decoder_info[2] = this->bits_per_sample;
+- buf->decoder_info[3] = this->channels;
+- /* copy the faux WAV header */
+- buf->size = sizeof(xine_waveformatex) + FLAC_STREAMINFO_SIZE;
+- memcpy(buf->content, this->streaminfo, buf->size);
+- /* forge a WAV header with the proper length */
+- wave.cbSize = FLAC_STREAMINFO_SIZE;
+- memcpy(buf->content, &wave, sizeof(xine_waveformatex));
+- this->audio_fifo->put (this->audio_fifo, buf);
++ if ( ! this->audio_fifo )
++ {
++ this->status = DEMUX_FINISHED;
++ return;
+ }
+
++ buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
++ buf->type = BUF_AUDIO_FLAC;
++ buf->decoder_flags = BUF_FLAG_HEADER|BUF_FLAG_STDHEADER|BUF_FLAG_FRAME_END;
++ buf->decoder_info[0] = 0;
++ buf->decoder_info[1] = this->sample_rate;
++ buf->decoder_info[2] = this->bits_per_sample;
++ buf->decoder_info[3] = this->channels;
++ /* copy the faux WAV header */
++ buf->size = sizeof(xine_waveformatex) + FLAC_STREAMINFO_SIZE;
++ memcpy(buf->content, this->streaminfo, buf->size);
++ /* forge a WAV header with the proper length */
++ wave.cbSize = FLAC_STREAMINFO_SIZE;
++ memcpy(buf->content, &wave, sizeof(xine_waveformatex));
++ this->audio_fifo->put (this->audio_fifo, buf);
++
++ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
++ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
++ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
++ this->channels);
++ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
++ this->sample_rate);
++ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
++ this->bits_per_sample);
++
+ this->status = DEMUX_OK;
+ }
+