summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-10-27 23:01:39 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-10-27 23:01:39 +0000
commit0025741d775d2c92493bc248394a9142c8b42cde (patch)
tree458bc69b8185b169cea8a9cc5f97570c9639d6e3 /src
parentd084d9162911a51ef75bcc83cba9b147678117a3 (diff)
downloadxine-lib-0025741d775d2c92493bc248394a9142c8b42cde.tar.gz
xine-lib-0025741d775d2c92493bc248394a9142c8b42cde.tar.bz2
asf content detection for seekable, but non-preview input plugins
CVS patchset: 3056 CVS date: 2002/10/27 23:01:39
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_asf.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 2cbb790d9..7e436c270 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_asf.c,v 1.71 2002/10/26 22:00:49 guenter Exp $
+ * $Id: demux_asf.c,v 1.72 2002/10/27 23:01:40 guenter Exp $
*
* demultiplexer for asf streams
*
@@ -1426,9 +1426,17 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen,
* try to get a preview of the data
*/
len = input->get_optional_data (input, buf, INPUT_OPTIONAL_DATA_PREVIEW);
- if (len == INPUT_OPTIONAL_UNSUPPORTED)
- return NULL;
-
+ if (len == INPUT_OPTIONAL_UNSUPPORTED) {
+
+ if (input->get_capabilities (input) & INPUT_CAP_SEEKABLE) {
+
+ input->seek (input, 0, SEEK_SET);
+ if (input->read (input, buf, 8192) != 8192)
+ return NULL;
+
+ } else
+ return NULL;
+ }
if (memcmp(buf, &asf_header, sizeof(GUID)))
return NULL;