1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
--- libavformat/matroskadec.c.orig 2010-05-23 00:20:56.000000000 +0200
+++ libavformat/matroskadec.c 2010-05-23 01:04:04.000000000 +0200
@@ -828,7 +828,7 @@
/*
* Autodetecting...
*/
-static int matroska_probe(AVProbeData *p)
+static int ebml_probe(AVProbeData *p, const char probe_data[], const int probe_data_size)
{
uint64_t total = 0;
int len_mask = 0x80, size = 1, n = 1, i;
@@ -868,6 +868,24 @@
return AVPROBE_SCORE_MAX/2;
}
+/*
+ * Autodetecting...
+ */
+#if CONFIG_MATROSKA_DEMUXER
+static int matroska_probe(AVProbeData *p)
+{
+ static const char probe_data[] = "matroska";
+ return ebml_probe(p, probe_data, sizeof(probe_data));
+}
+#endif
+#if CONFIG_WEBM_DEMUXER
+static int webm_probe(AVProbeData *p)
+{
+ static const char probe_data[] = "webm";
+ return ebml_probe(p, probe_data, sizeof(probe_data));
+}
+#endif
+
static MatroskaTrack *matroska_find_track_by_num(MatroskaDemuxContext *matroska,
int num)
{
|