Mercurial > audlegacy-plugins
diff src/flacng/plugin.c @ 931:b6c95e2a14f4 trunk
[svn]
- Implement seek support for files without a seektable
author | ertzing |
---|---|
date | Mon, 09 Apr 2007 11:12:20 -0700 |
parents | 2f742d127b3e |
children | 0ee1070d1741 |
line wrap: on
line diff
--- a/src/flacng/plugin.c Mon Apr 09 10:55:23 2007 -0700 +++ b/src/flacng/plugin.c Mon Apr 09 11:12:20 2007 -0700 @@ -473,19 +473,15 @@ if (-1 != seek_to) { _DEBUG("Seek requested to %d seconds", seek_to); - if (FALSE == main_info->stream.has_seektable) { - _ERROR("Stream does not have a seektable, can not seek!"); + seek_sample = seek_to * main_info->stream.samplerate; + _DEBUG("Seek requested to sample %d", seek_sample); + if (FALSE == FLAC__stream_decoder_seek_absolute(main_decoder, seek_sample)) { + _ERROR("Could not seek to sample %d!", seek_sample); } else { - seek_sample = seek_to * main_info->stream.samplerate; - _DEBUG("Seek requested to sample %d", seek_sample); - if (FALSE == FLAC__stream_decoder_seek_absolute(main_decoder, seek_sample)) { - _ERROR("Could not seek to sample %d!", seek_sample); - } else { - /* - * Flush the buffers - */ - flac_ip.output->flush(seek_to * 1000); - } + /* + * Flush the buffers + */ + flac_ip.output->flush(seek_to * 1000); } seek_to = -1; }