summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/files/0001-gstvideoconnector-fixed-buffers-allocation.patch
blob: cea07c930de96395aa3661522d5b160f2ed1fa58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From b308508b49afa9a129b4e4589c57cd107d1320b8 Mon Sep 17 00:00:00 2001
From: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Date: Fri, 6 May 2011 10:35:11 +1000
Subject: [PATCH] gstvideoconnector: fixed buffers allocation

It should not be necessary, but at least theora video decoder doesn't
iniatilize *buf, while gst_pad_alloc_buffer relies on buf being NULL.

Task-number: QTMOBILITY-1611
Reviewed-by: Michael Goddard
---
 plugins/multimedia/gstreamer/gstvideoconnector.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/plugins/multimedia/gstreamer/gstvideoconnector.c b/plugins/multimedia/gstreamer/gstvideoconnector.c
index ddf68e0..9f8ceae 100644
--- a/plugins/multimedia/gstreamer/gstvideoconnector.c
+++ b/plugins/multimedia/gstreamer/gstvideoconnector.c
@@ -186,6 +186,10 @@ gst_video_connector_buffer_alloc (GstPad * pad, guint64 offset, guint size,
     GstFlowReturn res = GST_FLOW_OK;
     element = GST_VIDEO_CONNECTOR (GST_PAD_PARENT (pad));
 
+    if (!buf)
+        return GST_FLOW_ERROR;
+    *buf = NULL;
+
     GST_OBJECT_LOCK (element);
     gst_object_ref(element->srcpad);
     GST_OBJECT_UNLOCK (element);
-- 
1.7.4.1