GstFlowReturn res;
GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
GstVideoFilterClass *fclass;
+#ifdef USE_TBM
+ GstMapFlags out_map_flags = GST_MAP_WRITE;
+#endif
if (G_UNLIKELY (!filter->negotiated))
goto unknown_format;
GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
goto invalid_buffer;
+#ifdef USE_TBM
+ if (filter->out_info.finfo->format != GST_VIDEO_FORMAT_SN12)
+ out_map_flags |= GST_VIDEO_FRAME_MAP_FLAG_NO_REF;
+
+ if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
+ out_map_flags)) {
+ gst_video_frame_unmap (&in_frame);
+ goto invalid_buffer;
+ }
+#else
if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) {
gst_video_frame_unmap (&in_frame);
goto invalid_buffer;
}
+#endif
res = fclass->transform_frame (filter, &in_frame, &out_frame);
gst_video_frame_unmap (&out_frame);