Skip to content

gstomxh264enc: make the buffer writable before passing it to the encoder

gst_buffer_ref in the line can affect the buffer's writability, so make sure its writable afterwards.

previously, with the following reproducer, there's a critical about the buffer's writability every ~2.5 seconds on a rpi3b+.

$ gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=720,framerate=25/1 ! glupload ! glcolorconvert ! gldownload ! omxh264enc ! video/x-h264,profile=high ! fakesink
..
(gst-launch-1.0:26155): GStreamer-CRITICAL **: 10:18:15.497: gst_buffer_add_meta: assertion 'gst_buffer_is_writable (buffer)' failed
..

Merge request reports

Loading