From 2b7594421cbde82ee1e67e625514321f9517ea76 Mon Sep 17 00:00:00 2001 From: Kazunori Kobayashi 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