aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-multimedia/gstreamer/gst-plugins-good/0015-videocrop-fix-wrong-subbuffer-size.patch
blob: 068241623ccd0b9fdff60ca889d9e6cebc1f0375 (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
From 2b7594421cbde82ee1e67e625514321f9517ea76 Mon Sep 17 00:00:00 2001
From: Kazunori Kobayashi <kkobayas@igel.co.jp>
Date: Thu, 4 Oct 2012 12:02:54 +0900
Subject: [PATCH 15/31] videocrop: fix wrong subbuffer size

It wasn't just subbuffer size but in a unit of stride.
This patch corrects it.
---
 gst/videocrop/gstvideocrop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c
index f2d2949..0743719 100644
--- a/gst/videocrop/gstvideocrop.c
+++ b/gst/videocrop/gstvideocrop.c
@@ -781,7 +781,7 @@ gst_video_crop_prepare_output_buffer (GstBaseTransform * trans,
     return GST_FLOW_OK;
   }
 
-  sub_size = vcrop->out.height * vcrop->out.stride;
+  sub_size = vcrop->in.size - sub_offset;
   *buf = gst_buffer_create_sub (input, sub_offset, sub_size);
   if (*buf == NULL) {
     GST_ERROR_OBJECT (vcrop, "failed to create subbuffer");
-- 
1.7.9.5