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 588717 - [oggmux] gst_caps_unref() warning if not linked downstream
[oggmux] gst_caps_unref() warning if not linked downstream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal normal
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-15 21:44 UTC by Ben Limmer
Modified: 2009-08-20 12:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
oggmux: fix warning when we're not linked downstream and error out properly (1.44 KB, patch)
2009-07-16 10:39 UTC, Tim-Philipp Müller
committed Details | Review

Description Ben Limmer 2009-07-15 21:44:57 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 )
Comment 1 Edward Hervey 2009-07-16 07:35:31 UTC
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.
Comment 2 Tim-Philipp Müller 2009-07-16 08:55:42 UTC
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

Comment 3 Tim-Philipp Müller 2009-07-16 10:39:38 UTC
Created attachment 138520 [details] [review]
oggmux: fix warning when we're not linked downstream and error out properly
Comment 4 Tim-Philipp Müller 2009-08-07 00:02:34 UTC
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.
Comment 5 Zaheer Abbas Merali 2009-08-20 11:29:08 UTC
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.
Comment 6 Tim-Philipp Müller 2009-08-20 12:21:02 UTC
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.