slomo gst-plugins-base: gst-plugins-base/ gst-plugins-base/gst/typefind/

[email protected] Thu, 11 Dec 2008 04:32:18 -0800 (PST)
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-plugins-base
Changes by:     slomo
Date:           Thu Dec 11 2008  12:32:18 UTC

Log message:
Patch by: Guillaume Emont <guillaume at fluendo dot com>
* gst/typefind/gsttypefindfunctions.c: (plugin_init):
Add typefinders for MS Word files and OS X .DS_Store files to
prevent them to be recognized as MPEG files. Fixes bug #564098.

Modified files:
    .               : ChangeLog
    gst/typefind    : gsttypefindfunctions.c

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.4244&r2=1.4245
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/typefind/gsttypefindfunctions.c.diff?r1=1.177&r2=1.178

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v
retrieving revision 1.4244
retrieving revision 1.4245
diff -u -d -r1.4244 -r1.4245
--- ChangeLog	11 Dec 2008 11:04:12 -0000	1.4244
+++ ChangeLog	11 Dec 2008 12:32:01 -0000	1.4245
@@ -1,3 +1,11 @@
+2008-12-11  Sebastian Dröge  <[email protected]>
+
+	Patch by: Guillaume Emont <guillaume at fluendo dot com>
+	* gst/typefind/gsttypefindfunctions.c: (plugin_init):
+	Add typefinders for MS Word files and OS X .DS_Store files to
+	prevent them to be recognized as MPEG files. Fixes bug #564098.
 2008-12-11  Wim Taymans  <[email protected]>
 
 	* gst/playback/gstplaysink.c: (gen_audio_chain),
Index: gsttypefindfunctions.c
RCS file: /cvs/gstreamer/gst-plugins-base/gst/typefind/gsttypefindfunctions.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- gsttypefindfunctions.c	10 Dec 2008 08:19:13 -0000	1.177
+++ gsttypefindfunctions.c	11 Dec 2008 12:32:03 -0000	1.178
@@ -3139,6 +3139,8 @@
   static gchar *imelody_exts[] = { "imy", "ime", "imelody", NULL };
   static gchar *pdf_exts[] = { "pdf", NULL };
   static gchar *mxf_exts[] = { "mxf", NULL };
+  static gchar *msword_exts[] = { "doc", NULL };
+  static gchar *dsstore_exts[] = { "DS_Store", NULL };
   GST_DEBUG_CATEGORY_INIT (type_find_debug, "typefindfunctions",
       GST_DEBUG_FG_GREEN | GST_DEBUG_BG_RED, "generic type find functions");
@@ -3356,6 +3358,13 @@
       GST_RANK_SECONDARY, nsf_exts, "NESM\x1a", 5, GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/pdf",
       GST_RANK_SECONDARY, pdf_exts, "%PDF-", 5, GST_TYPE_FIND_LIKELY);
+  TYPE_FIND_REGISTER_START_WITH (plugin, "application/msword",
+      GST_RANK_SECONDARY, msword_exts, "\320\317\021\340\241\261\032\341", 8,
+      GST_TYPE_FIND_LIKELY);
+  /* Mac OS X .DS_Store files tend to be taken for video/mpeg */
+  TYPE_FIND_REGISTER_START_WITH (plugin, "application/octet-stream",
+      GST_RANK_SECONDARY, dsstore_exts, "\000\000\000\001Bud1", 8,
   return TRUE;
 }

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/

_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose