GNOME Bugzilla – Bug 702167
matroskademux: missing mutex unlock leading to wrong STREAM_LOCK count
Last modified: 2013-06-14 12:16:22 UTC
There seems to be a bug in matroska-demux.c. It happens rarely, when seeking. The problem is that the common.sinkpad may be unlocked without having been locked first. This eventually leads to a negative depth of the recursive mutex, which in turn leads to the dreaded "GStreamer-WARNING **: wrong STREAM_LOCK count" message. I'm working on gstreamer 0.10, but the bug seems to also be present in latest matroskamux versions. To test it, start a pipeline, and seek randomly in an infinite loop. After a few seconds (no more than 1000 seeks later, at least in my tests), the bugged code branch will happen to be executed, and a deadlock ensues somewhere else. The attached patch fixes this problem in my case.
Created attachment 246713 [details] [review] Fix missing lock of a recursive mutex
commit e89a48616bbd030e520d4f22a2a919b3d3dba355 Author: Bruno Gonzalez <stenyak@gmail.com> Date: Fri Jun 14 14:09:50 2013 +0200 matroskademux: Don't unlock stream lock without locking it first https://bugzilla.gnome.org/show_bug.cgi?id=702167