After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 630205 - [icydemux] Forward tag events downstrem
[icydemux] Forward tag events downstrem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-20 20:13 UTC by Andoni Morales
Modified: 2010-11-04 09:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
icydemux: forward tag events downstream (1.27 KB, patch)
2010-09-20 20:13 UTC, Andoni Morales
none Details | Review
icydemux: forward tag events downstream (1.26 KB, patch)
2010-09-20 20:19 UTC, Andoni Morales
needs-work Details | Review
icydemux: forward tag events downstream (3.12 KB, patch)
2010-09-22 21:54 UTC, Andoni Morales
none Details | Review
icydemux: forward tag events downstream (3.11 KB, patch)
2010-09-22 21:59 UTC, Andoni Morales
needs-work Details | Review
0001-icydemux-forward-tag-events.patch (3.14 KB, patch)
2010-10-04 16:24 UTC, Andoni Morales
committed Details | Review

Description Andoni Morales 2010-09-20 20:13:33 UTC
Created attachment 170708 [details] [review]
icydemux: forward tag events downstream

The icy demuxer doesn't forward tag events downstream. 
If it's linked after the souphttpsrc element with 'iradio-mode=true' it will swallow tags such as organization, location, genre or encoding, which might be useful downstream.
Comment 1 Andoni Morales 2010-09-20 20:19:08 UTC
Created attachment 170712 [details] [review]
icydemux: forward tag events downstream

Replace MERGE_ALL with MERGE.
Comment 2 Edward Hervey 2010-09-21 06:56:24 UTC
Review of attachment 170712 [details] [review]:

::: gst/icydemux/gsticydemux.c
@@ +381,3 @@
         return gst_pad_event_default (pad, event);
+      case GST_EVENT_TAG:
+        if (icydemux->srcpad) {

That's almost exactly the same code as in gst_icydemux_parse_and_send_tags(), The code could be made clearer by having a gst_icydemux_found_tags(icydemux, tags) method.

@@ +383,3 @@
+        if (icydemux->srcpad) {
+          GST_DEBUG_OBJECT (icydemux, "Forwarding tag event on src pad");
+          gst_pad_push_event (icydemux->srcpad, event);

You lose the reference on the event here. Either you keep one or you add a break to avoid storing the event below.

@@ +393,3 @@
+          gst_tag_list_insert (icydemux->cached_tags, tags,
+              GST_TAG_MERGE_REPLACE);
+        }

Looks like you're missing a break.
Comment 3 Andoni Morales 2010-09-22 21:54:41 UTC
Created attachment 170866 [details] [review]
icydemux: forward tag events downstream

argg, you are right, this patch is crap :p
Attaching a new one with your suggestions
Comment 4 Andoni Morales 2010-09-22 21:59:09 UTC
Created attachment 170867 [details] [review]
icydemux: forward tag events downstream

Fix previous patch (return the value from gst_icydemux_tag_found in handle_event)
Comment 5 Edward Hervey 2010-09-23 06:31:32 UTC
Review of attachment 170867 [details] [review]:

Apart from that minor comment, looks good.

::: gst/icydemux/gsticydemux.c
@@ +382,3 @@
+    gst_event_parse_tag (event, &tags);
+    return gst_icydemux_tag_found (icydemux, tags);
+  }

You're leaking the event.
Comment 6 Andoni Morales 2010-10-04 16:24:50 UTC
Created attachment 171706 [details] [review]
0001-icydemux-forward-tag-events.patch 

Fix the event leak
Comment 7 Edward Hervey 2010-10-04 18:12:17 UTC
Pushed, thx

commit 4c2f5333bbd1766bfb1a3ce30a5ca34195e323d7
Author: Andoni Morales Alastruey <amorales@flumotion.com>
Date:   Mon Sep 20 19:44:09 2010 +0200

    icydemux: forward tag events
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630205
Comment 8 Tim-Philipp Müller 2010-11-04 09:38:35 UTC
Note that this broke tag handling a bit, see bug #633970.

Easy to reproduce with:

  gst-launch uridecodebin uri=http://mp3-vr-32.smgradio.com ! fakesink -v 2>&1 | more
Comment 9 Andoni Morales 2010-11-04 09:53:34 UTC
I'm sorry for that, I added the fix for the event leak without testing the patch again.