aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-07-17 15:04:03 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-07-17 15:04:03 -0500
commit8c311def96a8e68afeedeb43b38ee019788ca542 (patch)
tree174312ef5e3b83afc9c670f11742be74a5829245
parent892eed590fb30131ea2e8612da5ba22fa24f690c (diff)
downloadmediagoblin-8c311def96a8e68afeedeb43b38ee019788ca542.tar.lz
mediagoblin-8c311def96a8e68afeedeb43b38ee019788ca542.tar.xz
mediagoblin-8c311def96a8e68afeedeb43b38ee019788ca542.zip
Explicitly *do not* handle NEF files via the video media type.
Gstreamer might think it's a good idea, but it isn't.
-rw-r--r--mediagoblin/media_types/video/processing.py9
1 files changed, 9 insertions, 0 deletions
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)