Added TI patches, generated from commit 04f9d72 of the following tree:
[ubuntu-omap:gst-plugins-bad1-0.git] / debian / patches / 0078-PATCH-18-33-kmssink-use-gst_buffer_replace.patch
1 From af8d03faad663a46d8bf804d5cad80c72dca3fa2 Mon Sep 17 00:00:00 2001
2 From: Rob Clark <rob@ti.com>
3 Date: Thu, 14 Jun 2012 20:27:47 -0500
4 Subject: [PATCH 078/100] [PATCH 18/33] kmssink: use gst_buffer_replace
5
6 ---
7  sys/kms/gstkmssink.c |   18 ++++--------------
8  1 file changed, 4 insertions(+), 14 deletions(-)
9
10 diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
11 index 06fe8e2..6dda6a2 100644
12 --- a/sys/kms/gstkmssink.c
13 +++ b/sys/kms/gstkmssink.c
14 @@ -276,11 +276,8 @@ gst_kms_sink_show_frame (GstVideoSink * vsink, GstBuffer * inbuf)
15    if (ret)
16      goto set_plane_failed;
17  
18 -  if (sink->last_buf)
19 -    gst_buffer_unref (sink->last_buf);
20 -
21 -  sink->last_buf = sink->display_buf;
22 -  sink->display_buf = gst_buffer_ref (buf);
23 +  gst_buffer_replace (&sink->last_buf, sink->display_buf);
24 +  gst_buffer_replace (&sink->display_buf, buf);
25  
26  out:
27    GST_INFO_OBJECT (sink, "exit");
28 @@ -453,15 +450,8 @@ gst_kms_sink_reset (GstKMSSink * sink)
29      sink->resources = NULL;
30    }
31  
32 -  if (sink->last_buf) {
33 -    gst_buffer_unref (sink->last_buf);
34 -    sink->last_buf = NULL;
35 -  }
36 -
37 -  if (sink->display_buf) {
38 -    gst_buffer_unref (sink->display_buf);
39 -    sink->display_buf = NULL;
40 -  }
41 +  gst_buffer_replace (&sink->last_buf, NULL);
42 +  gst_buffer_replace (&sink->display_buf, NULL);
43  
44    if (sink->dev) {
45      omap_device_del (sink->dev);
46 -- 
47 1.7.9.5
48