GNOME Bugzilla – Bug 684398
videomixer: with transparent background, gst_buffer_memset() fails after gst_video_frame_map()
Last modified: 2012-09-25 22:33:48 UTC
This problem occurs in a MinGW build of RELEASE-0.11.94. It likely happens on all systems. It only happens when background=transparent. Here's a test pipeline: videomixer name=mix background=transparent ! videoconvert ! autovideosink videotestsrc ! video/x-raw,format=RGBA, width=200,height=200,framerate=10/1 ! videoconvert ! mix.sink_1 videotestsrc pattern=smpte ! video/x-raw,format=RGBA, width=720,height=480,framerate=10/1 ! videoconvert ! mix.sink_0 The error message: (gst-launch-1.0:6672): GStreamer-CRITICAL **: gst_buffer_memset: assertion `gst_buffer_is_writable (buffer)' failed The problem is in videomixer2.c starting at line 830: gst_video_frame_map (&outframe, &mix->info, *outbuf, GST_MAP_READWRITE); /* default to blending */ composite = mix->blend; switch (mix->background) { case VIDEO_MIXER2_BACKGROUND_CHECKER: mix->fill_checker (&outframe); break; case VIDEO_MIXER2_BACKGROUND_BLACK: mix->fill_color (&outframe, 16, 128, 128); break; case VIDEO_MIXER2_BACKGROUND_WHITE: mix->fill_color (&outframe, 240, 128, 128); break; case VIDEO_MIXER2_BACKGROUND_TRANSPARENT: gst_buffer_memset (*outbuf, 0, 0, outsize); /* use overlay to keep background transparent */ composite = mix->overlay; break; } The buffer is ref'd by both gst_video_frame_map and gst_buffer_memset. The gst_buffer_memset fails. There is also another problem with this test case. I'll make a second bug report.
This should hopefully fix it: commit 626e0258e32c6354de3fef180f9753ac5bb12870 Author: Tim-Philipp Müller <tim@centricular.net> Date: Tue Sep 25 21:21:15 2012 +0100 videomixer: fix warnings when using transparent background gst_video_frame_map() increases the refcount, which makes the buffer not writable any more technically, so calling gst_buffer_memset() on it will cause nasty warnings. Unit test disabled because it very rarely (for me) fails, possibly negotiation-related. https://bugzilla.gnome.org/show_bug.cgi?id=684398 > There is also another problem with this test case. I'll make > a second bug report. What's the other problem ? Did you file a bug for that? (the unit test sometimes fails, might be the same).