[totem] Fix stream tags leaking into next played file on error
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem] Fix stream tags leaking into next played file on error
- Date: Fri, 13 Nov 2009 13:26:41 +0000 (UTC)
commit dc3b8aab60c3744eb48928014fcbb74fe59e4856
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 13 13:24:18 2009 +0000
Fix stream tags leaking into next played file on error
When an error occurs during playback, we only clear the
tags when we have a new source element, which might happen
after we've tried to play a new file.
We should always clear the tags on _close() instead.
https://bugzilla.redhat.com/show_bug.cgi?id=536896
src/backend/bacon-video-widget-gst-0.10.c | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 569e751..6007a3a 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -2280,20 +2280,6 @@ playbin_source_notify_cb (GObject *play, GParamSpec *p, BaconVideoWidget *bvw)
BaconVideoWidgetPrivate *priv = bvw->priv;
GstElement *source = NULL;
- /* CHECKME: do we really need these taglist frees here (tpm)? */
- if (bvw->priv->tagcache) {
- gst_tag_list_free (bvw->priv->tagcache);
- bvw->priv->tagcache = NULL;
- }
- if (bvw->priv->audiotags) {
- gst_tag_list_free (bvw->priv->audiotags);
- bvw->priv->audiotags = NULL;
- }
- if (bvw->priv->videotags) {
- gst_tag_list_free (bvw->priv->videotags);
- bvw->priv->videotags = NULL;
- }
-
g_object_get (play, "source", &source, NULL);
if (priv->source != NULL) {
@@ -2303,7 +2289,7 @@ playbin_source_notify_cb (GObject *play, GParamSpec *p, BaconVideoWidget *bvw)
priv->source = source;
if (source == NULL)
return;
-
+
GST_DEBUG ("Got source of type %s", G_OBJECT_TYPE_NAME (source));
bvw_set_device_on_element (bvw, source);
bvw_set_user_agent_on_element (bvw, source);
@@ -3927,6 +3913,19 @@ bacon_video_widget_close (BaconVideoWidget * bvw)
bvw->priv->is_live = FALSE;
bvw->priv->window_resized = FALSE;
+ if (bvw->priv->tagcache) {
+ gst_tag_list_free (bvw->priv->tagcache);
+ bvw->priv->tagcache = NULL;
+ }
+ if (bvw->priv->audiotags) {
+ gst_tag_list_free (bvw->priv->audiotags);
+ bvw->priv->audiotags = NULL;
+ }
+ if (bvw->priv->videotags) {
+ gst_tag_list_free (bvw->priv->videotags);
+ bvw->priv->videotags = NULL;
+ }
+
g_object_notify (G_OBJECT (bvw), "seekable");
g_signal_emit (bvw, bvw_signals[SIGNAL_CHANNELS_CHANGE], 0);
got_time_tick (GST_ELEMENT (bvw->priv->play), 0, bvw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]