Replace webm category from video to ETC
[platform/core/multimedia/libmedia-service.git] / src / common / media-svc-util.c
index 7474d9a..57a4e34 100755 (executable)
@@ -485,6 +485,12 @@ static int __media_svc_get_content_type_from_mime(const char *path, const char *
                                /*even though error occued in mm_file_get_stream_info return MS_MEDIA_ERR_NONE. fail means invalid media content. */
                        }
                }
+
+               /*webm mime type is "video/webm". but It has to be classified into MS_CATEGORY_ETC because video player can not play webm*/
+               if (strncasecmp(mimetype, "video/webm", strlen("video/webm")) == 0) {
+                       *category ^= MEDIA_SVC_CATEGORY_VIDEO;
+                       *category |= MEDIA_SVC_CATEGORY_ETC;
+               }
        }
 
        return MS_MEDIA_ERR_NONE;