From 9b10ae5727c71c6a59c629cc2fd5b53d9fcfa38d Mon Sep 17 00:00:00 2001 From: Alex Agranovsky Date: Sat, 12 Sep 2015 00:08:19 +0200 Subject: [PATCH] avformat/format: Remove parameters from mime type before comparission for probing Signed-off-by: Michael Niedermayer --- libavformat/format.c | 5 +++++ 1 file changed, 5 insertions(+) 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) {