summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2007-02-27 22:47:46 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2007-02-27 22:47:46 +0000
commite9a6d18223a2e5e3e35bc23613850641c0e73154 (patch)
tree10bc2235584fb3d2aeaf4fb65dab14b1967467f9 /app-cdr/cuecue/files
parentRe-added version 2.2.1 since upstream still maintains that branch it is neede... (diff)
downloadgentoo-2-e9a6d18223a2e5e3e35bc23613850641c0e73154.tar.gz
gentoo-2-e9a6d18223a2e5e3e35bc23613850641c0e73154.tar.bz2
gentoo-2-e9a6d18223a2e5e3e35bc23613850641c0e73154.zip
adding flac 1.1.3 compatibility patch (see bug #157706).
(Portage version: 2.1.2-r2)
Diffstat (limited to 'app-cdr/cuecue/files')
-rw-r--r--app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff130
-rw-r--r--app-cdr/cuecue/files/digest-cuecue-0.2.2-r13
2 files changed, 133 insertions, 0 deletions
diff --git a/app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff b/app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff
new file mode 100644
index 000000000000..8a0252180d24
--- /dev/null
+++ b/app-cdr/cuecue/files/cuecue-0.2.2-flac113.diff
@@ -0,0 +1,130 @@
+diff -Naur src.orig/libcuecue/flac.c src/libcuecue/flac.c
+--- src.orig/libcuecue/flac.c 2004-09-22 04:28:21.000000000 +0200
++++ src/libcuecue/flac.c 2007-02-27 23:25:36.000000000 +0100
+@@ -27,6 +27,12 @@
+ #include "cuecue.h"
+ #include "cuecue_internal.h"
+
++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
++#define LEGACY_FLAC
++#else
++#undef LEGACY_FLAC
++#endif
++
+ typedef struct Internal
+ {
+ FILE *dst;
+@@ -38,7 +44,11 @@
+ } Internal;
+
+
++#ifdef LEGACY_FLAC
+ void error(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#else
++void error(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#endif
+ {
+ Internal *internal = client_data;
+ switch (status) {
+@@ -52,11 +62,21 @@
+ strcpy(cuecue_error,"CRC Mismatch: FLAC file corrupted");
+ internal->error=1;
+ break;
++#ifndef LEGACY_FLAC
++ case FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM:
++ strcpy(cuecue_error,"Unparseable stream");
++ internal->error=1;
++ break;
++#endif
+ }
+ }
+
+
++#ifdef LEGACY_FLAC
+ void metadata(const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#else
++void metadata(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#endif
+ {
+ if(metadata->type == FLAC__METADATA_TYPE_STREAMINFO) {
+ /* get size of the file, for progress callback */
+@@ -66,7 +86,11 @@
+ }
+
+
++#ifdef LEGACY_FLAC
+ FLAC__StreamDecoderWriteStatus write(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#else
++FLAC__StreamDecoderWriteStatus write(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#endif
+ {
+ Internal *internal = client_data;
+ unsigned int samples = frame->header.blocksize;
+@@ -126,7 +150,11 @@
+ {
+ FILE *dst;
+ Internal internal;
++#ifdef LEGACY_FLAC
+ FLAC__FileDecoder *decoder;
++#else
++ FLAC__StreamDecoder *decoder;
++#endif
+
+ dst = fopen(file_destination, "wb");
+
+@@ -141,7 +169,11 @@
+ internal.error=0;
+ internal.dst=dst;
+
++#ifdef LEGACY_FLAC
+ decoder = FLAC__file_decoder_new();
++#else
++ decoder = FLAC__stream_decoder_new();
++#endif
+
+ if (decoder==NULL) {
+ snprintf(cuecue_error,CUECUE_ERROR_LENGTH,"Cannot create FLAC decoder! memory error ?");
+@@ -150,6 +182,7 @@
+
+ internal.buffer = malloc(BUFFER_SIZE);
+
++#ifdef LEGACY_FLAC
+ FLAC__file_decoder_set_md5_checking(decoder, true);
+ FLAC__file_decoder_set_filename(decoder, file_source);
+
+@@ -162,8 +195,20 @@
+ snprintf(cuecue_error,1024,"Cannot open '%s'",file_source);
+ internal.error=1;
+ }
++#else
++ FLAC__stream_decoder_set_md5_checking(decoder, true);
++ if(FLAC__stream_decoder_init_file(decoder, file_source, write, metadata, error, &internal) != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
++ snprintf(cuecue_error,1024,"Cannot open '%s'",file_source);
++ internal.error=1;
++ }
++#endif
+
+- if(!FLAC__file_decoder_process_until_end_of_file(decoder)) {
++#ifdef LEGACY_FLAC
++ if(!FLAC__file_decoder_process_until_end_of_file(decoder))
++#else
++ if(!FLAC__stream_decoder_process_until_end_of_stream(decoder))
++#endif
++ {
+ if (!internal.error) {
+ /* early error, not even the time to decode metadata :) */
+ snprintf(cuecue_error,CUECUE_ERROR_LENGTH,"Cannot open '%s'",file_source);
+@@ -171,8 +216,13 @@
+ internal.error=1;
+ }
+
++#ifdef LEGACY_FLAC
+ FLAC__file_decoder_finish(decoder);
+ FLAC__file_decoder_delete(decoder);
++#else
++ FLAC__stream_decoder_finish(decoder);
++ FLAC__stream_decoder_delete(decoder);
++#endif
+
+ fclose(dst);
+ free(internal.buffer);
diff --git a/app-cdr/cuecue/files/digest-cuecue-0.2.2-r1 b/app-cdr/cuecue/files/digest-cuecue-0.2.2-r1
new file mode 100644
index 000000000000..5c06cec2f3ad
--- /dev/null
+++ b/app-cdr/cuecue/files/digest-cuecue-0.2.2-r1
@@ -0,0 +1,3 @@
+MD5 8c026bcf4ef93f7fa84ce232b621aa90 cuecue-0.2.2.tar.gz 97927
+RMD160 a456c197f83cbd303f06922c6c3c7f7c40ce752b cuecue-0.2.2.tar.gz 97927
+SHA256 dbab57f1df3e50d041ba8cad0ee0851c1aea97c4685f89fd1d3259b4b79f081f cuecue-0.2.2.tar.gz 97927