From b144bc6c58979f49a6e8e04a04a65f771247297a Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 22 Dec 2003 01:47:09 +0000 Subject: Merge CAPS branch Original commit message from CVS: Merge CAPS branch --- gst-libs/gst/media-info/media-info-priv.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'gst-libs/gst/media-info/media-info-priv.c') 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); } } } -- cgit v1.2.1