From 52fd64b61246fae4cf4618094a1ab4948b1ad6c7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 17 Jun 2006 14:42:05 +0000 Subject: Patch from Jan Schmidt: * don't free tag list which is passed to us, because it doesn't belong to us * use gst_util_uint64_scale_int() to calculate latency git-svn-id: file:///home/lennart/svn/public/gst-pulse/trunk@39 bb39ca4e-bce3-0310-b5d4-eea78a553289 --- src/polypsink.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/polypsink.c b/src/polypsink.c index d3d03b0..8e8a0b2 100644 --- a/src/polypsink.c +++ b/src/polypsink.c @@ -498,8 +498,8 @@ static guint gst_polypsink_delay(GstAudioSink *asink) { } pa_threaded_mainloop_unlock(polypsink->mainloop); - - return (guint) ((t * polypsink->sample_spec.rate) / 1000000LL); + + return gst_util_uint64_scale_int (t, polypsink->sample_spec.rate, 1000000LL); unlock_and_fail: @@ -592,8 +592,6 @@ static gboolean gst_polypsink_event(GstBaseSink *sink, GstEvent *event) { gst_tag_list_get_string(l, GST_TAG_LOCATION, &location); gst_tag_list_get_string(l, GST_TAG_DESCRIPTION, &description); - gst_tag_list_free(l); - if (title && artist) t = buf = g_strdup_printf("'%s' by '%s'", title, artist); else if (title) -- cgit