Fixed crash issue due to passthrough mode operation in preroll state 37/179237/5
authorSejun Park <sejun79.park@samsung.com>
Wed, 16 May 2018 11:00:02 +0000 (20:00 +0900)
committerSejun Park <sejun79.park@samsung.com>
Fri, 18 May 2018 04:02:00 +0000 (13:02 +0900)
Change-Id: I44393289a264f6811f29e970e6191d264317c53f

gst/videoconvert/gstvideoconvert.c
packaging/gst-plugins-base.spec

index fcd69f3..9788fb9 100644 (file)
@@ -765,7 +765,7 @@ gst_video_convert_decide_allocation (GstBaseTransform * trans,
       vc->pool = gst_tizen_buffer_pool_new ();
       config = gst_buffer_pool_get_config (vc->pool);
 
-      gst_buffer_pool_config_set_params (config, caps, size, 2, 0);
+      gst_buffer_pool_config_set_params (config, caps, size, 4, 10);
       gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
       gst_buffer_pool_set_config (vc->pool, config);
 
@@ -788,19 +788,25 @@ static GstFlowReturn
 gst_video_convert_prepare_output_buffer (GstBaseTransform * trans,
     GstBuffer *input, GstBuffer **outbuf)
 {
+  GstBuffer *buf = NULL;
   GstVideoConvert *vc = NULL;
   GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
 
-  vc = GST_VIDEO_CONVERT_CAST(trans);
+  vc = GST_VIDEO_CONVERT_CAST (trans);
 
   if (filter->out_info.finfo->format == GST_VIDEO_FORMAT_SN12 ) {
-    if (gst_buffer_pool_acquire_buffer(vc->pool, outbuf, 0) != GST_FLOW_OK) {
+    if (gst_buffer_pool_acquire_buffer (vc->pool, &buf, 0) != GST_FLOW_OK) {
       GST_ERROR("[%s] memory prepare failed.",__FUNCTION__);
-        return GST_FLOW_ERROR;
+      return GST_FLOW_ERROR;
     }
-      return GST_FLOW_OK;
-  } else
-    return GST_BASE_TRANSFORM_CLASS (parent_class)->prepare_output_buffer(trans, input, outbuf);
+
+    if (input != buf)
+      GST_BASE_TRANSFORM_CLASS (parent_class)->copy_metadata (trans, input, buf);
+    *outbuf = buf;
+
+    return GST_FLOW_OK;
+  }
+  return GST_BASE_TRANSFORM_CLASS (parent_class)->prepare_output_buffer(trans, input, outbuf);
 }
 #endif
 
index 8d96c55..72b3ec3 100755 (executable)
@@ -5,7 +5,7 @@
 
 Name:           gst-plugins-base
 Version:        1.12.2
-Release:        2
+Release:        3
 License:        LGPL-2.0+
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 Url:            http://gstreamer.freedesktop.org/