diff options
author | Reinhard Tartler <siretart@tauware.de> | 2010-05-25 18:21:59 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2010-05-25 18:21:59 +0000 |
commit | 6ae05f541a3feea250bcd2f36bbe7294b6f4049c (patch) | |
tree | d515e9e2ee5b9b902adef4d5eb1bff6c25fd126f | |
parent | 9d3bb3501de9c9221c90a5ef22ba899e29fbd231 (diff) |
matroskadec: Allow unknown EBML doctype
backport r23246 by conrad
Originally committed as revision 23314 to svn://svn.ffmpeg.org/ffmpeg/branches/0.6
-rw-r--r-- | libavformat/matroskadec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index df7edac131..e254a31416 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -858,7 +858,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, @@ -1155,9 +1156,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); |