mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
doc: Add missing map flag to gst_video_frame_map()
Add missing map flag, and also add unmap call.
This commit is contained in:
parent
031f256584
commit
1852e7b88a
1 changed files with 3 additions and 1 deletions
|
@ -199,7 +199,7 @@ invalid_size:
|
|||
* GstVideoFrame vframe;
|
||||
* ...
|
||||
* // set RGB pixels to black one at a time
|
||||
* if (gst_video_frame_map (&vframe, video_info, video_buffer)) {
|
||||
* if (gst_video_frame_map (&vframe, video_info, video_buffer, GST_MAP_WRITE)) {
|
||||
* guint8 *pixels = GST_VIDEO_FRAME_PLANE_DATA (vframe, 0);
|
||||
* guint stride = GST_VIDEO_FRAME_PLANE_STRIDE (vframe, 0);
|
||||
* guint pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (vframe, 0);
|
||||
|
@ -211,6 +211,8 @@ invalid_size:
|
|||
* memset (pixel, 0, pixel_stride);
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* gst_video_frame_unmap (&vframe);
|
||||
* }
|
||||
* ...
|
||||
* ]|
|
||||
|
|
Loading…
Reference in a new issue