[Bug 747495] gst_base_text_overlay_push_frame() doesn't make memory copy when video buffer's memory is ready only

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Apr 26 20:26:13 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=747495

--- Comment #2 from Mingke Wang <mingke.wang at freescale.com> ---
If I set the flag of memory in buffer as READONLY.(via setting
GST_MEMORY_FLAG_READONLY to its pool allocator to make the allocated memory is
read only). then

video_frame = gst_buffer_make_writable (video_frame);
gst_video_frame_map(&frame, &overlay->info, video_frame,GST_MAP_READWRITE);

I got failed with following error:

ERROR                default video-frame.c:141:gst_video_frame_map_id: failed
to map video frame plane 0

Did i missed something? or is there any interface need to be implemented? 

the use case is:
we use a hardware decoder, so the buffer was allocated by this hardware
decoder.
but for some format, say H264, this decoder need reference the outputed frame.
so the output frame can't be modified. but in subtitle case, we need blending
text on to the output frame, in this case, we need copy the original output
frame, then blend and output the copied buffer.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list