mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
metavideo: small fixes
Set the buffer as a field in the metadata so that we can use it to map the buffer data. Fix wrong assert.
This commit is contained in:
parent
0d75dc5a0b
commit
7426f19027
1 changed files with 2 additions and 1 deletions
|
@ -66,6 +66,7 @@ gst_buffer_add_meta_video_full (GstBuffer * buffer, GstVideoFlags flags,
|
|||
meta->format = format;
|
||||
meta->width = width;
|
||||
meta->height = height;
|
||||
meta->buffer = buffer;
|
||||
|
||||
meta->n_planes = n_planes;
|
||||
for (i = 0; i < n_planes; i++)
|
||||
|
@ -115,7 +116,7 @@ gst_meta_video_map (GstMetaVideo * meta, guint plane, gint * stride,
|
|||
g_return_val_if_fail (buffer != NULL, NULL);
|
||||
|
||||
write = (flags & GST_MAP_WRITE) != 0;
|
||||
g_return_val_if_fail (write && !gst_buffer_is_writable (buffer), NULL);
|
||||
g_return_val_if_fail (!write || gst_buffer_is_writable (buffer), NULL);
|
||||
|
||||
offset = meta->plane[plane].offset;
|
||||
*stride = meta->plane[plane].stride;
|
||||
|
|
Loading…
Reference in a new issue