[FFmpeg-cvslog] r23314 - in branches/0.6: . libavformat/matroskadec.c

siretart subversion
Tue May 25 20:21:59 CEST 2010


Author: siretart
Date: Tue May 25 20:21:59 2010
New Revision: 23314

Log:
matroskadec: Allow unknown EBML doctype

backport r23246 by conrad

Modified:
   branches/0.6/   (props changed)
   branches/0.6/libavformat/matroskadec.c

Modified: branches/0.6/libavformat/matroskadec.c
==============================================================================
--- branches/0.6/libavformat/matroskadec.c	Tue May 25 20:20:59 2010	(r23313)
+++ branches/0.6/libavformat/matroskadec.c	Tue May 25 20:21:59 2010	(r23314)
@@ -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(AVFormat
         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);



More information about the ffmpeg-cvslog mailing list