summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-05-22 01:41:35 +0000
committerDavid Conrad <lessen42@gmail.com>2010-05-22 01:41:35 +0000
commitc7b913c8ad651d47c51df39fab4b564ee9415daf (patch)
tree7592a62f079b163aefa5e3834617e375179161e2 /libavformat/matroskadec.c
parent470491faed80883d9e5d50715947a880f040c5be (diff)
matroskadec: Allow unknown EBML doctype
Originally committed as revision 23246 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index e5d34d7b41..45bea618c6 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -860,7 +860,8 @@ static int matroska_probe(AVProbeData *p)
return AVPROBE_SCORE_MAX;
}
- return 0;
+ // probably valid EBML header but no recognized doctype
+ return AVPROBE_SCORE_MAX/2;
}
static MatroskaTrack *matroska_find_track_by_num(MatroskaDemuxContext *matroska,
@@ -1157,9 +1158,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!strcmp(ebml.doctype, matroska_doctypes[i]))
break;
if (i >= FF_ARRAY_ELEMS(matroska_doctypes)) {
- av_log(s, AV_LOG_ERROR, "Unknown EBML doctype '%s'\n", ebml.doctype);
- ebml_free(ebml_syntax, &ebml);
- return AVERROR_PATCHWELCOME;
+ av_log(s, AV_LOG_WARNING, "Unknown EBML doctype '%s'\n", ebml.doctype);
}
av_metadata_set2(&s->metadata, "doctype", ebml.doctype, 0);
ebml_free(ebml_syntax, &ebml);