diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-06-03 12:19:34 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-06-03 12:19:34 +0000 |
commit | 92fe79269011f6e6cd197cdff854c6b5efbd999c (patch) | |
tree | 8906bcd95823a6c77ce2ceb2db4345f3f1c2faa2 | |
parent | 9a9cbf10d1b4b7baabce0de67a33bda940d75f6f (diff) | |
download | xine-lib-92fe79269011f6e6cd197cdff854c6b5efbd999c.tar.gz xine-lib-92fe79269011f6e6cd197cdff854c6b5efbd999c.tar.bz2 |
EOF when read returns <= 0 (thanks Leon van Stuivenberg)
CVS patchset: 6632
CVS date: 2004/06/03 12:19:34
-rw-r--r-- | src/libflac/demux_flac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libflac/demux_flac.c b/src/libflac/demux_flac.c index 7de820321..dadc03e2e 100644 --- a/src/libflac/demux_flac.c +++ b/src/libflac/demux_flac.c @@ -109,10 +109,10 @@ flac_read_callback (const FLAC__SeekableStreamDecoder *decoder, lprintf("Read %lld / %u bytes into buffer\n", offset, *bytes); - *bytes = offset; /* This is the way to detect EOF with xine input plugins */ - if ( (offset != *bytes) && (*bytes != 0) ) + if ( offset <= 0 && *bytes != 0 ) { + *bytes = offset; lprintf("Marking EOF\n"); this->status = DEMUX_FINISHED; @@ -120,6 +120,7 @@ flac_read_callback (const FLAC__SeekableStreamDecoder *decoder, } else { + *bytes = offset; lprintf("Read was perfect\n"); return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK; |