[shotwell/shotwell-0.26] Do not filter out application/x-extension-mp4 from VideoSupport
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.26] Do not filter out application/x-extension-mp4 from VideoSupport
- Date: Thu, 9 Nov 2017 11:57:05 +0000 (UTC)
commit 79d74903a0b7ac330c8ccec3b0510e1462da5b14
Author: Jens Georg <mail jensge org>
Date: Sat Sep 16 09:13:39 2017 +0200
Do not filter out application/x-extension-mp4 from VideoSupport
https://bugzilla.gnome.org/show_bug.cgi?id=773206
src/VideoSupport.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/VideoSupport.vala b/src/VideoSupport.vala
index 5076a31..d742dda 100644
--- a/src/VideoSupport.vala
+++ b/src/VideoSupport.vala
@@ -74,7 +74,8 @@ public class VideoReader {
public static bool is_supported_video_filename(string filename) {
string mime_type;
mime_type = ContentType.guess(filename, new uchar[0], null);
- if (mime_type.length >= 6 && mime_type[0:6] == "video/") {
+ // Guessed mp4 from filename has application/ as prefix, so check for mp4 in the end
+ if (mime_type.has_prefix ("video/") || mime_type.has_suffix("mp4")) {
string? extension = null;
string? name = null;
disassemble_filename(filename, out name, out extension);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]