summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-02-14 19:45:19 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-02-14 19:45:19 +0000
commitb0ed7aa0a292f1fc88629901c25fe4ab0f895af6 (patch)
tree740a6dde9a65da870ad9e2a3a49262ff023e5033
parent6977dbc2f08c0f42f0f5b915f57a265b333a7531 (diff)
downloadxine-lib-b0ed7aa0a292f1fc88629901c25fe4ab0f895af6.tar.gz
xine-lib-b0ed7aa0a292f1fc88629901c25fe4ab0f895af6.tar.bz2
fix bug causing division by zero @ audio_out.c
CVS patchset: 4161 CVS date: 2003/02/14 19:45:19
-rw-r--r--src/libflac/demux_flac.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libflac/demux_flac.c b/src/libflac/demux_flac.c
index 63e837960..f0aeffa3f 100644
--- a/src/libflac/demux_flac.c
+++ b/src/libflac/demux_flac.c
@@ -260,8 +260,8 @@ flac_error_callback (const FLAC__SeekableStreamDecoder *decoder,
/* This will be called if there is an error when flac is seeking
* in the stream.
*/
+ demux_flac_t *this = (demux_flac_t *)client_data;
-#ifdef LOG
printf("demux_flac: flac_error_callback\n");
if (status == FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)
printf("demux_flac: Decoder lost synchronization.\n");
@@ -271,7 +271,8 @@ flac_error_callback (const FLAC__SeekableStreamDecoder *decoder,
printf("demux_flac: Frame's data did not match the CRC in the footer.\n");
else
printf("demux_flac: unknown error.\n");
-#endif
+
+ this->status = DEMUX_FINISHED;
return;
}
@@ -503,8 +504,9 @@ open_plugin (demux_class_t *class_gen,
if (input->get_capabilities (input) & INPUT_CAP_SEEKABLE) {
input->seek (input, 0, SEEK_SET);
- if ( (len=input->read (input, buf, 1024)) <= 0)
- return NULL;
+ if ( (len=input->read (input, buf, 1024)) <= 0)
+ return NULL;
+ input->seek (input, 0, SEEK_SET);
} else
return NULL;