doc: Add missing map flag to gst_video_frame_map()

Add missing map flag, and also add unmap call.
This commit is contained in:
Nicolas Dufresne 2016-09-19 11:27:10 -04:00
parent 031f256584
commit 1852e7b88a

View file

@ -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);
* }
* ...
* ]|