Commit ef2ee8aa authored by conrad's avatar conrad

matroskadec: Allow unknown EBML doctype

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23246 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 89970543
...@@ -860,7 +860,8 @@ static int matroska_probe(AVProbeData *p) ...@@ -860,7 +860,8 @@ static int matroska_probe(AVProbeData *p)
return AVPROBE_SCORE_MAX; 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, static MatroskaTrack *matroska_find_track_by_num(MatroskaDemuxContext *matroska,
...@@ -1157,9 +1158,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1157,9 +1158,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!strcmp(ebml.doctype, matroska_doctypes[i])) if (!strcmp(ebml.doctype, matroska_doctypes[i]))
break; break;
if (i >= FF_ARRAY_ELEMS(matroska_doctypes)) { if (i >= FF_ARRAY_ELEMS(matroska_doctypes)) {
av_log(s, AV_LOG_ERROR, "Unknown EBML doctype '%s'\n", ebml.doctype); av_log(s, AV_LOG_WARNING, "Unknown EBML doctype '%s'\n", ebml.doctype);
ebml_free(ebml_syntax, &ebml);
return AVERROR_PATCHWELCOME;
} }
av_metadata_set2(&s->metadata, "doctype", ebml.doctype, 0); av_metadata_set2(&s->metadata, "doctype", ebml.doctype, 0);
ebml_free(ebml_syntax, &ebml); ebml_free(ebml_syntax, &ebml);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment