From: Christopher Allan Webber Date: Thu, 17 Jul 2014 20:04:03 +0000 (-0500) Subject: Explicitly *do not* handle NEF files via the video media type. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8c311def96a8e68afeedeb43b38ee019788ca542;p=mediagoblin.git Explicitly *do not* handle NEF files via the video media type. Gstreamer might think it's a good idea, but it isn't. --- diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index 454f4ac4..c21c74b3 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -44,7 +44,16 @@ class VideoTranscodingFail(BaseProcessingFail): general_message = _(u'Video transcoding failed') +EXCLUDED_EXTS = ["nef"] + def sniff_handler(media_file, filename): + name, ext = os.path.splitext(filename) + clean_ext = ext.lower()[1:] + + if clean_ext in EXCLUDED_EXTS: + # We don't handle this filetype, though gstreamer might think we can + return None + transcoder = transcoders.VideoTranscoder() data = transcoder.discover(media_file.name)