aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/gstreamer_extractor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gstreamer_extractor.c')
-rw-r--r--src/plugins/gstreamer_extractor.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/gstreamer_extractor.c b/src/plugins/gstreamer_extractor.c
index 2d6a2bb..a92a47c 100644
--- a/src/plugins/gstreamer_extractor.c
+++ b/src/plugins/gstreamer_extractor.c
@@ -849,6 +849,7 @@ send_structure_foreach (GQuark field_id, const GValue *value,
849 gchar *str; 849 gchar *str;
850 const gchar *field_name = g_quark_to_string (field_id); 850 const gchar *field_name = g_quark_to_string (field_id);
851 const gchar *type_name = g_type_name (G_VALUE_TYPE (value)); 851 const gchar *type_name = g_type_name (G_VALUE_TYPE (value));
852 GType gst_fraction = GST_TYPE_FRACTION;
852 853
853 /* TODO: check a list of known quarks, use specific EXTRACTOR_MetaType */ 854 /* TODO: check a list of known quarks, use specific EXTRACTOR_MetaType */
854 switch (G_VALUE_TYPE (value)) 855 switch (G_VALUE_TYPE (value))
@@ -863,6 +864,11 @@ send_structure_foreach (GQuark field_id, const GValue *value,
863 str = gst_value_serialize (value); 864 str = gst_value_serialize (value);
864 break; 865 break;
865 default: 866 default:
867 if (G_VALUE_TYPE (value) == gst_fraction)
868 {
869 str = gst_value_serialize (value);
870 break;
871 }
866 /* This is a potential source of invalid characters */ 872 /* This is a potential source of invalid characters */
867 /* And it also might attempt to serialize binary data - such as images. */ 873 /* And it also might attempt to serialize binary data - such as images. */
868 str = NULL; 874 str = NULL;
@@ -1331,6 +1337,7 @@ send_toc_tags_foreach (const GstTagList * tags, const gchar * tag,
1331 GValue val = { 0, }; 1337 GValue val = { 0, };
1332 gchar *topen, *str, *tclose; 1338 gchar *topen, *str, *tclose;
1333 const gchar *type_name; 1339 const gchar *type_name;
1340 GType gst_fraction = GST_TYPE_FRACTION;
1334 1341
1335 gst_tag_list_copy_value (&val, tags, tag); 1342 gst_tag_list_copy_value (&val, tags, tag);
1336 1343
@@ -1347,6 +1354,11 @@ send_toc_tags_foreach (const GstTagList * tags, const gchar * tag,
1347 str = gst_value_serialize (&val); 1354 str = gst_value_serialize (&val);
1348 break; 1355 break;
1349 default: 1356 default:
1357 if (G_VALUE_TYPE (&val) == gst_fraction)
1358 {
1359 str = gst_value_serialize (&val);
1360 break;
1361 }
1350 /* This is a potential source of invalid characters */ 1362 /* This is a potential source of invalid characters */
1351 /* And it also might attempt to serialize binary data - such as images. */ 1363 /* And it also might attempt to serialize binary data - such as images. */
1352 str = NULL; 1364 str = NULL;