From 8c311def96a8e68afeedeb43b38ee019788ca542 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 17 Jul 2014 15:04:03 -0500 Subject: [PATCH] Explicitly *do not* handle NEF files via the video media type. Gstreamer might think it's a good idea, but it isn't. --- mediagoblin/media_types/video/processing.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- 2.25.1