mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 06:01:04 +00:00
videofilter: don't map writable in passthrough
In passthrough mode we shouldn't map the buffer in write mode because the buffer might not be writable.
This commit is contained in:
parent
b701534204
commit
6f8347de9f
1 changed files with 7 additions and 1 deletions
|
@ -277,8 +277,14 @@ gst_video_filter_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
|
||||||
fclass = GST_VIDEO_FILTER_GET_CLASS (filter);
|
fclass = GST_VIDEO_FILTER_GET_CLASS (filter);
|
||||||
if (fclass->transform_frame_ip) {
|
if (fclass->transform_frame_ip) {
|
||||||
GstVideoFrame frame;
|
GstVideoFrame frame;
|
||||||
|
GstMapFlags flags;
|
||||||
|
|
||||||
if (!gst_video_frame_map (&frame, &filter->in_info, buf, GST_MAP_READWRITE))
|
flags = GST_MAP_READ;
|
||||||
|
|
||||||
|
if (!gst_base_transform_is_passthrough (trans))
|
||||||
|
flags |= GST_MAP_WRITE;
|
||||||
|
|
||||||
|
if (!gst_video_frame_map (&frame, &filter->in_info, buf, flags))
|
||||||
goto invalid_buffer;
|
goto invalid_buffer;
|
||||||
|
|
||||||
res = fclass->transform_frame_ip (filter, &frame);
|
res = fclass->transform_frame_ip (filter, &frame);
|
||||||
|
|
Loading…
Reference in a new issue