summaryrefslogtreecommitdiff
path: root/libavformat/format.c
diff options
context:
space:
mode:
authorAlex Agranovsky <alex@sighthound.com>2015-09-12 00:08:19 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-12 00:42:18 +0200
commit9b10ae5727c71c6a59c629cc2fd5b53d9fcfa38d (patch)
treee0391447dcbaf95c5dfde191eed16979e0468bf8 /libavformat/format.c
parentb8e4df46ab5a6b8333dbcd872e4f161fc9bba83a (diff)
downloadffmpeg-9b10ae5727c71c6a59c629cc2fd5b53d9fcfa38d.tar.gz
avformat/format: Remove parameters from mime type before comparission for probing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/format.c')
-rw-r--r--libavformat/format.c5
1 files changed, 5 insertions, 0 deletions
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) {