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 771040 - tsdemux: program change causes pad name clash
tsdemux: program change causes pad name clash
Status: RESOLVED DUPLICATE of bug 758454
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-08 07:57 UTC by Jesper Larsen
Modified: 2016-09-08 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] tsdemux: Remove old pads before adding new pads (1.74 KB, patch)
2016-09-08 07:57 UTC, Jesper Larsen
none Details | Review

Description Jesper Larsen 2016-09-08 07:57:32 UTC
Created attachment 335069 [details] [review]
[PATCH] tsdemux: Remove old pads before adding new pads

It seems there is a wrong order in how things are done in gst_ts_demux_program_started.

1. If there was a previous program, the streams are drained, which is all good.
2. Next the new stream pads are created and activated.
3. If there was a previous program, it is deactivated and freed

If the programs shares streams, step no 2 will try to create a pad with a name that already exists.

The attached patch changes the order of 2 and 3, such that the old program is freed before we create the streams for the new program.

This might be related to https://bugzilla.gnome.org/show_bug.cgi?id=730960
Comment 1 Sebastian Dröge (slomo) 2016-09-08 09:54:26 UTC
Isn't this fixed by

commit e3f5ccb3333f3b22c41e59cf78e4343c99187009
Author: Jan Schmidt <jan@centricular.com>
Date:   Wed Sep 23 02:51:57 2015 +1000

    tsdemux: Change the pad naming scheme to include a generation ID
    
    A simple fix for the problem of creating new pads with duplicate
    names when switching program, easier than the alternative of
    trying to work out which pads might persist and manage that.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=758454
Comment 2 Jesper Larsen 2016-09-08 10:10:37 UTC
Sorry, I was on the 1.8 branch. That commit should fix it.

I cannot easily step up the version of my test case right now, so I'll close this bug for now. I'll get back if my issue persists in 1.10.
Comment 3 Sebastian Dröge (slomo) 2016-09-08 10:28:51 UTC

*** This bug has been marked as a duplicate of bug 758454 ***