[FFmpeg-cvslog] avformat/format: Remove parameters from mime type before comparission for probing

Alex Agranovsky git at videolan.org
Sat Sep 12 01:17:55 CEST 2015


ffmpeg | branch: master | Alex Agranovsky <alex at sighthound.com> | Sat Sep 12 00:08:19 2015 +0200| [9b10ae5727c71c6a59c629cc2fd5b53d9fcfa38d] | committer: Michael Niedermayer

avformat/format: Remove parameters from mime type before comparission for probing

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b10ae5727c71c6a59c629cc2fd5b53d9fcfa38d
---

 libavformat/format.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/format.c b/libavformat/format.c
index 7df06b7..d9b8989 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) {



More information about the ffmpeg-cvslog mailing list