summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--src/demuxers/demux_asf.c16
2 files changed, 12 insertions, 5 deletions
diff --git a/TODO b/TODO
index 3d604794b..9473e2b5c 100644
--- a/TODO
+++ b/TODO
@@ -6,7 +6,6 @@ required for 1.0pre
- input_vcd
- input_stdin, input_net (guenter)
-- demux_asf: content detection for files (guenter)
required for 1.0
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;