From 931ca6f5fea6b53dee5bf3131dc0e46199425038 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 17 Apr 2007 03:50:16 +0100 Subject: Fix DVD playback (was hanging when either the AC3 or DTS demuxers were probed). This may have side-effects wrt other streams; CDDA is fine, though. --- src/demuxers/demux_ac3.c | 2 +- src/demuxers/demux_dts.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c index 73313ee12..279da6336 100644 --- a/src/demuxers/demux_ac3.c +++ b/src/demuxers/demux_ac3.c @@ -135,7 +135,7 @@ static int open_ac3_file(demux_ac3_t *this) { uint8_t *peak; blocksize = this->input->get_blocksize(this->input); - if (blocksize) { + if (blocksize && INPUT_IS_SEEKABLE(this->input)) { this->input->seek(this->input, 0, SEEK_SET); buf_element_t *buf = this->input->read_block(this->input, this->stream->audio_fifo, diff --git a/src/demuxers/demux_dts.c b/src/demuxers/demux_dts.c index a5beba7dd..a9541b6f7 100644 --- a/src/demuxers/demux_dts.c +++ b/src/demuxers/demux_dts.c @@ -85,7 +85,7 @@ static int open_dts_file(demux_dts_t *this) { lprintf("open_dts_file\n"); blocksize = this->input->get_blocksize(this->input); - if (blocksize) { + if (blocksize && INPUT_IS_SEEKABLE(this->input)) { // this->input->seek(this->input, 0, SEEK_SET); buf_element_t *buf = this->input->read_block(this->input, this->stream->audio_fifo, -- cgit v1.2.3