decodebin3: fix collection refcounting
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 22 Jul 2016 12:35:17 +0000 (14:35 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 25 Jul 2016 07:02:53 +0000 (09:02 +0200)
commit2c0a4d20d4c75bf2cfdc03d18321241221421561
tree83b704d90d5118f1994e02e5030eb78293fbb8f0
parent5044bf79ae6f666bf7138c77c060c2bd50671669
decodebin3: fix collection refcounting

My collection leak fix 83f30627cd9460157935e7e9603c60a15555967e
introduced a crash in this scenario: audiotestsrc ! decodebin3 ! fakesink

The reference handling of collection in decodebin3 wasn't very clear and
my attempt to fix the leak introduced a regression where we went one
reference short in some other scenarios.

Fixing this by:
- Giving a strong reference to DecodebinInput making things clearer
- Fixing get_merged_collection() which was sometimes returning an
  existing reference and sometimes a new one.

https://bugzilla.gnome.org/show_bug.cgi?id=769080
gst/playback/gstdecodebin3.c