GNOME Bugzilla – Bug 588717
[oggmux] gst_caps_unref() warning if not linked downstream
Last modified: 2009-08-20 12:21:02 UTC
I was grabbing video from my webcam and forgot to connect my oggmuxer to a filesink, which resulted in this error repeatedly: (gst-launch-0.10:26866): GStreamer-CRITICAL **: gst_caps_unref: assertion `caps != NULL' failed This problem can easily be reproduced by creating a pipeline ending with an oggmuxer without a sink element at the end: (e.g. gst-launch v4l2src ! ffmpegcolorspace ! videorate ! videoscale ! theoraenc ! oggmux )
I'm tempted to mark this bug as INVALID. I don't think we accept bugs on invalid pipelines. Also, it's not a documentation bug.
I don't see how the pipeline is 'invalid'. The pipeline/oggmux should properly error out without warnings or crashes. Even shorter: gst-launch-0.10 audiotestsrc ! vorbisenc ! oggmux
Created attachment 138520 [details] [review] oggmux: fix warning when we're not linked downstream and error out properly
Sorry for dropping the ball on this one, should be fixed in git now. commit 16cad126f0a4744669a0d4d715062fe567f615a4 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Jul 16 11:29:20 2009 +0100 oggmux: fix warning when we're not linked downstream and error out properly Fix caps warning when there's no element linked downstream, and pass not-linked flow return value correctly up the chain, so we error out correctly. Fixes #588717.
That commit 16cad126f0a4744669a0d4d715062fe567f615a4 breaks stuff because it reverts src pad caps to application/ogg and removes the streamheader from the src pad caps and buffers' caps.
Sorry about that and thanks for spotting it. Let's try this then: commit 099989ff0fb1fbbceebf0fdbe93cb7ea5c8cd8c0 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Aug 20 13:11:07 2009 +0100 oggmux: don't drop the streamheader field from the output caps Revert previous 'fix' for bug #588717 and fix it properly, whilst maintaining the streamheader field on the output caps. Also make sure we don't leak header buffers we couldn't push when downstream is unlinked. Add unit test for the presence of the streamheader field on the output caps and for the issue from bug #588717.