summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/media-info/media-info-priv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/media-info/media-info-priv.c')
-rw-r--r--gst-libs/gst/media-info/media-info-priv.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gst-libs/gst/media-info/media-info-priv.c b/gst-libs/gst/media-info/media-info-priv.c
index 77981598..c7f470ea 100644
--- a/gst-libs/gst/media-info/media-info-priv.c
+++ b/gst-libs/gst/media-info/media-info-priv.c
@@ -136,13 +136,13 @@ gmi_reset (GstMediaInfo *info)
if (priv->format)
{
GMI_DEBUG ("unreffing priv->format, error before this ?\n");
- gst_caps_unref (priv->format);
+ gst_caps_free (priv->format);
priv->format = NULL;
}
if (priv->metadata)
{
GMI_DEBUG ("unreffing priv->metadata, error before this ?\n");
- gst_caps_unref (priv->metadata);
+ gst_caps_free (priv->metadata);
priv->metadata = NULL;
}
if (priv->stream)
@@ -193,12 +193,12 @@ gmi_seek_to_track (GstMediaInfo *info, long track)
/* clear structs because of the seek */
if (priv->metadata)
{
- gst_caps_unref (priv->metadata);
+ gst_caps_free (priv->metadata);
priv->metadata = NULL;
}
if (priv->streaminfo)
{
- gst_caps_unref (priv->streaminfo);
+ gst_caps_free (priv->streaminfo);
priv->streaminfo = NULL;
}
return TRUE;
@@ -304,7 +304,7 @@ gmip_find_type_pre (GstMediaInfoPriv *priv)
if (priv->type)
{
/* we don't need to unref, this is done inside gsttypefind.c
- gst_caps_unref (priv->type);
+ gst_caps_free (priv->type);
*/
priv->type = NULL;
}
@@ -573,14 +573,13 @@ gmip_find_track_streaminfo_post (GstMediaInfoPriv *priv)
&format, &value_end);
if (res)
{
- GstPropsEntry *length;
/* substract to get the length */
GMI_DEBUG("DEBUG: start %lld, end %lld\n", value_start, value_end);
value_end -= value_start;
/* FIXME: check units; this is in seconds */
- length = gst_props_entry_new ("length",
- GST_PROPS_INT ((int) (value_end / 1E6)));
- gst_props_add_entry (gst_caps_get_props (priv->streaminfo), length);
+
+ gst_caps_set_simple (priv->streaminfo,
+ "length", G_TYPE_INT, (int) (value_end / 1E6), NULL);
}
}
}