From 916589570c3fcbc8c87e88deceffa6cdb53b4b8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 7 Aug 2008 16:13:41 +0000 Subject: [PATCH] ext/flac/gstflacenc.c: If seeking failed return the appropiate return value to FLAC. Original commit message from CVS: * ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback): If seeking failed return the appropiate return value to FLAC. Otherwise it thinks seeking was successfull and tries to rewrite parts of the headers which then get appended to the output. --- ChangeLog | 7 +++++++ ext/flac/gstflacenc.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index f49fed4..0faf96d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-07 Sebastian Dröge + + * ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback): + If seeking failed return the appropiate return value to FLAC. + Otherwise it thinks seeking was successfull and tries to rewrite + parts of the headers which then get appended to the output. + 2008-08-07 Tim-Philipp Müller Patch by: Frederic Crozat diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 1e29343..4f290c4 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -797,6 +797,12 @@ gst_flac_enc_seek_callback (const FLAC__StreamEncoder * encoder, } else { GST_DEBUG ("Seek to %" G_GUINT64_FORMAT " %s", absolute_byte_offset, "failed"); +#ifdef LEGACY_FLAC + return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED; +#else + return FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED; +#endif + } } else { GST_DEBUG ("Seek to %" G_GUINT64_FORMAT " failed (no peer pad)", -- 2.7.4