diff --git a/libavformat/format.c b/libavformat/format.c index 7df06b70fc..d9b8989b03 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -261,8 +261,13 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, if (pb->av_class) { uint8_t *mime_type_opt = NULL; + char* semi; av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type_opt); pd.mime_type = (const char *)mime_type_opt; + semi = pd.mime_type?strchr(pd.mime_type, ';'):NULL; + if (semi) { + *semi='\0'; + } } #if 0 if (!*fmt && pb->av_class && av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type) >= 0 && mime_type) {