GstBuffer *input, GstBuffer **outbuf)
{
GstVideoConvertScalePrivate *priv = PRIV (trans);
- GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
+ GstVideoConvertScale *self = GST_VIDEO_CONVERT_SCALE_CAST (trans);
GstBuffer *buf = NULL;
- if (filter->out_info.finfo->format == GST_VIDEO_FORMAT_SN12 ) {
- if (gst_buffer_pool_acquire_buffer (priv->pool, &buf, 0) != GST_FLOW_OK) {
- GST_ERROR_OBJECT (trans, "Buffer acquire failed");
- return GST_FLOW_ERROR;
- }
+ if (!priv->pool)
+ 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);
+ if (gst_buffer_pool_acquire_buffer (priv->pool, &buf, 0) != GST_FLOW_OK) {
+ GST_ERROR_OBJECT (trans, "Buffer acquire failed");
+ return GST_FLOW_ERROR;
+ }
- *outbuf = buf;
+ GST_DEBUG_OBJECT (self, "acquired buffer %p", buf);
- return GST_FLOW_OK;
- }
+ if (input != buf)
+ GST_BASE_TRANSFORM_CLASS (parent_class)->copy_metadata (trans, input, buf);
+
+ *outbuf = buf;
- return GST_BASE_TRANSFORM_CLASS (parent_class)->prepare_output_buffer (trans, input, outbuf);
+ return GST_FLOW_OK;
}
#endif