Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
:
branches:nemo:devel:hw:ti:omap4:common
>
gst-plugins-base
> 0025-streamsplitter-Fix-getcaps-src-pad-caps-merge.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0025-streamsplitter-Fix-getcaps-src-pad-caps-merge.patch of Package gst-plugins-base
From 001b64daeec55a318a0109ccbe0da0a9d94b8abf Mon Sep 17 00:00:00 2001 From: Robert Swain <robert.swain@collabora.co.uk> Date: Wed, 29 Jun 2011 11:30:51 +0200 Subject: [PATCH 25/38] streamsplitter: Fix getcaps src pad caps merge Caps returned from gst_pad_peer_get_caps_reffed () may not be writable. If they are not is should cause an assertion in gst_caps_merge (), however, sometimes assertions are disabled in binary builds of -base and it's safer to just be sure the caps are writable. Also, check that the reffed caps pointer is not NULL. --- gst/encoding/gststreamsplitter.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gst/encoding/gststreamsplitter.c b/gst/encoding/gststreamsplitter.c index c473386..c531b4c 100644 --- a/gst/encoding/gststreamsplitter.c +++ b/gst/encoding/gststreamsplitter.c @@ -268,10 +268,13 @@ resync: GstPad *srcpad = (GstPad *) tmp->data; STREAMS_UNLOCK (stream_splitter); - if (res) - gst_caps_merge (res, gst_pad_peer_get_caps_reffed (srcpad)); - else + if (res) { + GstCaps *peercaps = gst_pad_peer_get_caps_reffed (srcpad); + if (peercaps) + gst_caps_merge (res, gst_caps_make_writable (peercaps)); + } else { res = gst_pad_peer_get_caps (srcpad); + } STREAMS_LOCK (stream_splitter); if (G_UNLIKELY (cookie != stream_splitter->cookie)) { -- 1.7.5.4