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 769270 - decodebin3/playbin3: fix ref handling
decodebin3/playbin3: fix ref handling
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.9.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-28 13:50 UTC by Guillaume Desmottes
Modified: 2016-08-04 09:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decodebin3: fix collection ref handling (1.47 KB, patch)
2016-07-28 13:50 UTC, Guillaume Desmottes
committed Details | Review
decodebin3: don't leak alternate inputs (1.38 KB, patch)
2016-07-28 13:50 UTC, Guillaume Desmottes
committed Details | Review
decodebin_next: fix caps and tags leaks (2.46 KB, patch)
2016-07-28 13:51 UTC, Guillaume Desmottes
committed Details | Review
decodebin3: consume select-streams event (824 bytes, patch)
2016-08-01 10:29 UTC, Guillaume Desmottes
committed Details | Review
decodebin3: fix tag list leak (1.28 KB, patch)
2016-08-01 10:38 UTC, Guillaume Desmottes
committed Details | Review
decodebin3: fix output->decoder_{sink,src} leak (1.41 KB, patch)
2016-08-01 11:37 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2016-07-28 13:50:31 UTC
.
Comment 1 Guillaume Desmottes 2016-07-28 13:50:48 UTC
Created attachment 332278 [details] [review]
decodebin3: fix collection ref handling

gst_stream_collection_add_stream() consumes the collection reference
passed to it but gst_stream_collection_get_stream() is (transfer none).

Fix this pipeline:

playbin3
uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd
Comment 2 Guillaume Desmottes 2016-07-28 13:50:54 UTC
Created attachment 332279 [details] [review]
decodebin3: don't leak alternate inputs

Fix leaks (including parsebin elements) with this pipeline:
playbin3
uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd
Comment 3 Guillaume Desmottes 2016-07-28 13:51:00 UTC
Created attachment 332280 [details] [review]
decodebin_next: fix caps and tags leaks

The getters are (transfer full).
Comment 4 Guillaume Desmottes 2016-08-01 10:29:08 UTC
Created attachment 332469 [details] [review]
decodebin3: consume select-streams event
Comment 5 Guillaume Desmottes 2016-08-01 10:38:05 UTC
Created attachment 332472 [details] [review]
decodebin3: fix tag list leak
Comment 6 Guillaume Desmottes 2016-08-01 11:37:32 UTC
Created attachment 332474 [details] [review]
decodebin3: fix output->decoder_{sink,src} leak

output->decoder_sink and output->decoder_src are both going to be
replaced in the 2 branches of the following 'if'.
Comment 7 Edward Hervey 2016-08-03 15:45:34 UTC
Review of attachment 332279 [details] [review]:

::: gst/playback/gstdecodebin3.c
@@ +631,3 @@
+
+    free_input (dbin, input);
+    dbin->other_inputs = g_list_delete_link (dbin->other_inputs, walk);

or just use g_list_free_full(dbin->other_inputs, free_input) ?
Comment 8 Edward Hervey 2016-08-03 15:52:08 UTC
In the meantime I pushed the others :


commit 487ef12fd129428faf11736967922905523302c0
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon Aug 1 13:35:16 2016 +0200

    decodebin3: fix output->decoder_{sink,src} leak
    
    output->decoder_sink and output->decoder_src are both going to be
    replaced in the 2 branches of the following 'if'.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769270

commit acbaa83450d13d20e4851ab5fa959166688b5add
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon Aug 1 12:37:43 2016 +0200

    decodebin3: fix tag list leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769270

commit 0b77ede0791bb354b7cb72b00a1db5eaa269d3c0
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon Aug 1 12:28:20 2016 +0200

    decodebin3: consume select-streams event
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769270

commit 12c268b7c5ed988666315718b4df789648222472
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Thu Jul 28 15:44:27 2016 +0200

    decodebin_next: fix caps and tags leaks
    
    The getters are (transfer full).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769270

commit ba74c06721a64c9b84f94f247066006fa2a56b84
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Thu Jul 28 14:46:34 2016 +0200

    decodebin3: fix collection ref handling
    
    gst_stream_collection_add_stream() consumes the collection reference
    passed to it but gst_stream_collection_get_stream() is (transfer none).
    
    Fix this pipeline:
    
    playbin3
    uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769270
Comment 9 Guillaume Desmottes 2016-08-04 09:12:47 UTC
Review of attachment 332279 [details] [review]:

::: gst/playback/gstdecodebin3.c
@@ +631,3 @@
+
+    free_input (dbin, input);
+    dbin->other_inputs = g_list_delete_link (dbin->other_inputs, walk);

Nope because free_input() takes GstDecodebin3 as first argument.
Comment 10 Edward Hervey 2016-08-04 09:18:51 UTC
ah, of course.

commit f66e6839c5a9ddd67b492a38194535fcb294d584
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Thu Jul 28 15:04:01 2016 +0200

    decodebin3: don't leak alternate inputs
    
    Fix leaks (including parsebin elements) with this pipeline:
    playbin3
    uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769270