After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684398 - videomixer: with transparent background, gst_buffer_memset() fails after gst_video_frame_map()
videomixer: with transparent background, gst_buffer_memset() fails after gst_...
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2012-09-19 19:17 UTC by Michael Rubinstein
Modified: 2012-09-25 22:33 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Michael Rubinstein 2012-09-19 19:17:39 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) {
      mix->fill_checker (&outframe);
      mix->fill_color (&outframe, 16, 128, 128);
      mix->fill_color (&outframe, 240, 128, 128);
      gst_buffer_memset (*outbuf, 0, 0, outsize);
      /* use overlay to keep background transparent */
      composite = mix->overlay;

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.
Comment 1 Tim-Philipp Müller 2012-09-25 22:33:48 UTC
This should hopefully fix it:

 commit 626e0258e32c6354de3fef180f9753ac5bb12870
 Author: Tim-Philipp Müller <>
 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.

> 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).