GNOME Bugzilla – Bug 632988
[discoverer] gst_caps_ref() critical for substreams of unknown streams
Last modified: 2010-10-25 07:31:54 UTC
$ gst-discoverer /home/tpm/tmp/607630-test-paprika-head.mkv Analyzing file:///home/tpm/tmp/607630-test-paprika-head.mkv No accelerated IMDCT transform found Done discovering file:///home/tpm/tmp/607630-test-paprika-head.mkv Topology: container: Matroska unknown: application/x-ass (lt-gst-discoverer:28817): GStreamer-CRITICAL **: gst_caps_ref: assertion `caps != NULL' failed unknown: (null) audio: AC-3 (ATSC A/52) video: H.264 Duration: 1:30:32.391000000 (gdb) bt
+ Trace 224296
Created attachment 173085 [details] beginning of matroska file that triggers this
Simple to fix by the following patch but I think there shouldn't be a substream for this at all --- a/gst-libs/gst/pbutils/gstdiscoverer-types.c +++ b/gst-libs/gst/pbutils/gstdiscoverer-types.c @@ -539,7 +539,7 @@ gst_discoverer_stream_info_get_caps (GstDiscovererStreamInfo * info) { g_return_val_if_fail (GST_IS_DISCOVERER_STREAM_INFO (info), NULL); - return gst_caps_ref (info->caps); + return info->caps ? gst_caps_ref (info->caps) : NULL; } /**
Also gst-discover should be versioned like gst-inspect-0.10, etc with an unversioned wrapper script.
Created attachment 173107 [details] [review] decodebin2: Don't add non prerolled stream to topology If a final stream didn't preroll, don't add it to the topology since it doesn't give any information at all.
This patch doesn't seem to work for me, I still get the problem. Also, it takes an awfully long time (multiple seconds) to come up with the information, whereas a simple filesrc ! decodebin2 ! fakesink prerolls almost immediately.
The beginning of that file isn't enough to trigger the issue here
(In reply to comment #5) > This patch doesn't seem to work for me, I still get the problem. Also, it takes > an awfully long time (multiple seconds) to come up with the information, > whereas a simple filesrc ! decodebin2 ! fakesink prerolls almost immediately. Most likely because data on some stream (and not the one you connected to fakesink) doesn't arrive before a long time.
Created attachment 173118 [details] [review] discoverer: Don't ref a NULL caps
Created attachment 173119 [details] [review] discoverer: Get pad caps if we can't get negotiated caps Better provide something than nothing
Comment on attachment 173119 [details] [review] discoverer: Get pad caps if we can't get negotiated caps Works for me, thanks!
Attachment 173107 [details] pushed as a5752d8 - decodebin2: Don't add non prerolled stream to topology Attachment 173118 [details] pushed as da9682a - discoverer: Don't ref a NULL caps Attachment 173119 [details] pushed as 65cfcff - discoverer: Get pad caps if we can't get negotiated caps