[totem-pl-parser/gnome-2-28] Fix parsing of 3gpp files
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser/gnome-2-28] Fix parsing of 3gpp files
- Date: Thu, 26 Aug 2010 13:15:02 +0000 (UTC)
commit df64ba67e1ad1edb92734aed4218f8e8520f2f63
Author: Bastien Nocera <hadess hadess net>
Date: Thu Aug 26 14:11:49 2010 +0100
Fix parsing of 3gpp files
3GPP files with a .mp4 suffix would have been ignored by the
parser when they should actually be marked as "unhandled"
by the parser, and handled by the player instead.
Fixed Debian bug #594359.
plparse/tests/3gpp-file.mp4 | Bin 0 -> 524288 bytes
plparse/tests/Makefile.am | 4 ++--
plparse/tests/parser.c | 12 ++++++++++++
plparse/totem-pl-parser.c | 1 +
4 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/plparse/tests/3gpp-file.mp4 b/plparse/tests/3gpp-file.mp4
new file mode 100644
index 0000000..e750cd0
Binary files /dev/null and b/plparse/tests/3gpp-file.mp4 differ
diff --git a/plparse/tests/Makefile.am b/plparse/tests/Makefile.am
index f9bf07f..f977e65 100644
--- a/plparse/tests/Makefile.am
+++ b/plparse/tests/Makefile.am
@@ -54,5 +54,5 @@ EXTRA_DIST = \
pukas.wax \
asf-with-asx-suffix.asx \
remote_xspf.php \
- HackerMedley
-
+ HackerMedley \
+ 3gpp-file.mp4
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index ab16d73..031a15c 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -403,6 +403,17 @@ test_parsing_404_error (void)
}
static void
+test_parsing_3gpp_not_ignored (void)
+{
+ char *uri;
+
+ uri = get_relative_uri (TEST_SRCDIR "3gpp-file.mp4");
+ g_test_bug ("594359 bugs debian org");
+ g_assert (simple_parser_test (uri) == TOTEM_PL_PARSER_RESULT_UNHANDLED);
+ g_free (uri);
+}
+
+static void
test_parsing_xml_head_comments (void)
{
char *uri;
@@ -624,6 +635,7 @@ main (int argc, char *argv[])
g_test_add_func ("/parser/parsing/nonexistent_files", test_parsing_nonexistent_files);
g_test_add_func ("/parser/parsing/broken_asx", test_parsing_broken_asx);
g_test_add_func ("/parser/parsing/404_error", test_parsing_404_error);
+ g_test_add_func ("/parser/parsing/3gpp_not_ignored", test_parsing_3gpp_not_ignored);
g_test_add_func ("/parser/parsing/out_of_order_asx", test_parsing_out_of_order_asx);
g_test_add_func ("/parser/parsing/xml_head_comments", test_parsing_xml_head_comments);
g_test_add_func ("/parser/parsing/xml_comment_whitespace", test_parsing_xml_comment_whitespace);
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index 06edbd8..15c7914 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -231,6 +231,7 @@ static PlaylistTypes dual_types[] = {
PLAYLIST_TYPE2 ("video/x-ms-wmv", totem_pl_parser_add_asf, totem_pl_parser_is_asf),
PLAYLIST_TYPE2 ("video/quicktime", totem_pl_parser_add_quicktime, totem_pl_parser_is_quicktime),
PLAYLIST_TYPE2 ("video/mp4", totem_pl_parser_add_quicktime, totem_pl_parser_is_quicktime),
+ PLAYLIST_TYPE2 ("video/3gpp", totem_pl_parser_add_quicktime, totem_pl_parser_is_quicktime),
PLAYLIST_TYPE2 ("application/x-quicktime-media-link", totem_pl_parser_add_quicktime, totem_pl_parser_is_quicktime),
PLAYLIST_TYPE2 ("application/x-quicktimeplayer", totem_pl_parser_add_quicktime, totem_pl_parser_is_quicktime),
PLAYLIST_TYPE2 ("application/xml", totem_pl_parser_add_xml_feed, totem_pl_parser_is_xml_feed),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]