I have just done an NMU of libaudio-flac-decoder-perl to fix longstanding issues. Please find the diff attached.
-- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net
diff -u libaudio-flac-decoder-perl-0.2/debian/changelog libaudio-flac-decoder-perl-0.2/debian/changelog --- libaudio-flac-decoder-perl-0.2/debian/changelog +++ libaudio-flac-decoder-perl-0.2/debian/changelog @@ -1,3 +1,10 @@ +libaudio-flac-decoder-perl (0.2-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Update to FLAC 1.1.4 API (Closes: #427748, #451862, #426665). + + -- Aurelien Jarno <[EMAIL PROTECTED]> Tue, 15 Jan 2008 17:25:16 +0100 + libaudio-flac-decoder-perl (0.2-2) unstable; urgency=low * Updated standards-version to 3.7.2. only in patch2: unchanged: --- libaudio-flac-decoder-perl-0.2.orig/Decoder.xs +++ libaudio-flac-decoder-perl-0.2/Decoder.xs @@ -49,32 +49,23 @@ #define my_hv_fetch(a,b) hv_fetch(a,b,strlen(b),0) /* Create some generic (and shorter) names for these types. */ -typedef FLAC__SeekableStreamDecoder decoder_t; -typedef FLAC__SeekableStreamDecoderReadStatus read_status_t; +typedef FLAC__StreamDecoder decoder_t; +typedef FLAC__StreamDecoderReadStatus read_status_t; -#define FLACdecoder_new() FLAC__seekable_stream_decoder_new() -#define FLACdecoder_init(x) FLAC__seekable_stream_decoder_init(x) -#define FLACdecoder_process_metadata(x) FLAC__seekable_stream_decoder_process_until_end_of_metadata(x) -#define FLACdecoder_process_single(x) FLAC__seekable_stream_decoder_process_single(x) -#define FLACdecoder_finish(x) FLAC__seekable_stream_decoder_finish(x) -#define FLACdecoder_delete(x) FLAC__seekable_stream_decoder_delete(x) -#define FLACdecoder_set_read_callback(x, y) FLAC__seekable_stream_decoder_set_read_callback(x, y) -#define FLACdecoder_set_write_callback(x, y) FLAC__seekable_stream_decoder_set_write_callback(x, y) -#define FLACdecoder_set_metadata_callback(x, y) FLAC__seekable_stream_decoder_set_metadata_callback(x, y) -#define FLACdecoder_set_error_callback(x, y) FLAC__seekable_stream_decoder_set_error_callback(x, y) -#define FLACdecoder_set_client_data(x, y) FLAC__seekable_stream_decoder_set_client_data(x, y) -#define FLACdecoder_set_seek_callback(x, y) FLAC__seekable_stream_decoder_set_seek_callback(x, y) -#define FLACdecoder_set_tell_callback(x, y) FLAC__seekable_stream_decoder_set_tell_callback(x, y) -#define FLACdecoder_set_length_callback(x, y) FLAC__seekable_stream_decoder_set_length_callback(x, y) -#define FLACdecoder_set_eof_callback(x, y) FLAC__seekable_stream_decoder_set_eof_callback(x, y) -#define FLACdecoder_seek_absolute(x, y) FLAC__seekable_stream_decoder_seek_absolute(x, y) - -#define FLACdecoder_get_state(x) FLAC__seekable_stream_decoder_get_state(x) -#define FLACdecoder_get_channels(x) FLAC__seekable_stream_decoder_get_channels(x) -#define FLACdecoder_get_blocksize(x) FLAC__seekable_stream_decoder_get_blocksize(x) -#define FLACdecoder_get_sample_rate(x) FLAC__seekable_stream_decoder_get_sample_rate(x) -#define FLACdecoder_get_bits_per_sample(x) FLAC__seekable_stream_decoder_get_bits_per_sample(x) -#define FLACdecoder_get_decode_position(x, y) FLAC__seekable_stream_decoder_get_decode_position(x, y) +#define FLACdecoder_new() FLAC__stream_decoder_new() +#define FLACdecoder_init_stream(q, r, s, t, u, v, w, x, y, z) FLAC__stream_decoder_init_stream(q, r, s, t, u, v, w, x, y, z) +#define FLACdecoder_process_metadata(x) FLAC__stream_decoder_process_until_end_of_metadata(x) +#define FLACdecoder_process_single(x) FLAC__stream_decoder_process_single(x) +#define FLACdecoder_finish(x) FLAC__stream_decoder_finish(x) +#define FLACdecoder_delete(x) FLAC__stream_decoder_delete(x) +#define FLACdecoder_seek_absolute(x, y) FLAC__stream_decoder_seek_absolute(x, y) + +#define FLACdecoder_get_state(x) FLAC__stream_decoder_get_state(x) +#define FLACdecoder_get_channels(x) FLAC__stream_decoder_get_channels(x) +#define FLACdecoder_get_blocksize(x) FLAC__stream_decoder_get_blocksize(x) +#define FLACdecoder_get_sample_rate(x) FLAC__stream_decoder_get_sample_rate(x) +#define FLACdecoder_get_bits_per_sample(x) FLAC__stream_decoder_get_bits_per_sample(x) +#define FLACdecoder_get_decode_position(x, y) FLAC__stream_decoder_get_decode_position(x, y) #define SAMPLES_PER_WRITE 512 @@ -182,7 +173,7 @@ warn("FLAC decoder error_callback: %s\n", status); } -static FLAC__SeekableStreamDecoderSeekStatus seek_callback( +static FLAC__StreamDecoderSeekStatus seek_callback( const decoder_t *decoder, FLAC__uint64 absolute_byte_offset, void *client_data) { @@ -190,17 +181,17 @@ /* can't seek on a socket */ if (datasource->is_streaming) { - return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR; + return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR; } if (PerlIO_seek(datasource->stream, absolute_byte_offset, SEEK_SET) >= 0) { - return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK; + return FLAC__STREAM_DECODER_SEEK_STATUS_OK; } - return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR; + return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR; } -static FLAC__SeekableStreamDecoderTellStatus tell_callback( +static FLAC__StreamDecoderTellStatus tell_callback( const decoder_t *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data) { @@ -209,20 +200,20 @@ /* can't tell on a socket */ if (datasource->is_streaming) { - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR; + return FLAC__STREAM_DECODER_TELL_STATUS_ERROR; } pos = PerlIO_tell(datasource->stream); if (pos < 0) { - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR; + return FLAC__STREAM_DECODER_TELL_STATUS_ERROR; } *absolute_byte_offset = pos; - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK; + return FLAC__STREAM_DECODER_TELL_STATUS_OK; } -static FLAC__SeekableStreamDecoderLengthStatus length_callback( +static FLAC__StreamDecoderLengthStatus length_callback( const decoder_t *decoder, FLAC__uint64 *stream_length, void *client_data) { @@ -230,11 +221,11 @@ /* can't find the total length of a socket */ if (datasource->is_streaming) { - return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR; + return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR; } *stream_length = datasource->stream_length; - return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK; + return FLAC__STREAM_DECODER_LENGTH_STATUS_OK; } static FLAC__bool eof_callback( @@ -268,10 +259,10 @@ datasource->buffer_size = *bytes; if (*bytes <= 0) { - return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; + return FLAC__STREAM_DECODER_READ_STATUS_ABORT; } - return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK; + return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; } static FLAC__StreamDecoderWriteStatus write_callback( @@ -369,16 +360,6 @@ XSRETURN_UNDEF; } - FLACdecoder_set_read_callback(datasource->decoder, read_callback); - FLACdecoder_set_write_callback(datasource->decoder, write_callback); - FLACdecoder_set_metadata_callback(datasource->decoder, meta_callback); - FLACdecoder_set_error_callback(datasource->decoder, error_callback); - FLACdecoder_set_client_data(datasource->decoder, (void*)datasource); - FLACdecoder_set_seek_callback(datasource->decoder, seek_callback); - FLACdecoder_set_tell_callback(datasource->decoder, tell_callback); - FLACdecoder_set_length_callback(datasource->decoder, length_callback); - FLACdecoder_set_eof_callback(datasource->decoder, eof_callback); - if (!datasource->is_streaming) { pos = PerlIO_tell(datasource->stream); @@ -400,7 +381,7 @@ } } - if (FLACdecoder_init(datasource->decoder) != FLAC__SEEKABLE_STREAM_DECODER_OK) { + if (FLACdecoder_init_stream(datasource->decoder, read_callback, seek_callback, tell_callback, length_callback, eof_callback, write_callback, meta_callback, error_callback, (void *)datasource) != FLAC__STREAM_DECODER_INIT_STATUS_OK) { warn("Failed on initializing the decoder: [%d]\n", FLACdecoder_get_state(datasource->decoder)); @@ -459,7 +440,7 @@ unsigned s = datasource->wide_samples_in_reservoir; - if (FLACdecoder_get_state(datasource->decoder) == FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM ) { + if (FLACdecoder_get_state(datasource->decoder) == FLAC__STREAM_DECODER_END_OF_STREAM ) { break; } else if (!FLACdecoder_process_single(datasource->decoder)) { @@ -595,7 +576,7 @@ XSRETURN_UNDEF; } - if (!FLAC__seekable_stream_decoder_reset(datasource->decoder)) { + if (!FLAC__stream_decoder_reset(datasource->decoder)) { XSRETURN_UNDEF; }