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 632988 - [discoverer] gst_caps_ref() critical for substreams of unknown streams
[discoverer] gst_caps_ref() critical for substreams of unknown streams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-23 16:28 UTC by Tim-Philipp Müller
Modified: 2010-10-25 07:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
beginning of matroska file that triggers this (500.00 KB, application/octet-stream)
2010-10-23 16:31 UTC, Tim-Philipp Müller
  Details
decodebin2: Don't add non prerolled stream to topology (1.70 KB, patch)
2010-10-24 08:10 UTC, Edward Hervey
committed Details | Review
discoverer: Don't ref a NULL caps (889 bytes, patch)
2010-10-24 14:19 UTC, Edward Hervey
committed Details | Review
discoverer: Get pad caps if we can't get negotiated caps (1.33 KB, patch)
2010-10-24 14:19 UTC, Edward Hervey
committed Details | Review

Description Tim-Philipp Müller 2010-10-23 16:28:23 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

  • #0 g_logv
    at /glib2.0-2.27.0/glib/gmessages.c line 563
  • #1 g_log
    at /glib2.0-2.27.0/glib/gmessages.c line 577
  • #2 gst_caps_ref
    at gstcaps.c line 402
  • #3 print_stream_info
    at gst-discoverer.c line 176
  • #4 print_topology
    at gst-discoverer.c line 219
  • #5 print_topology
    at gst-discoverer.c line 223
  • #6 print_topology
    at gst-discoverer.c line 231
  • #7 print_info
    at gst-discoverer.c line 292
  • #8 process_file
    at gst-discoverer.c line 352
  • #9 main
    at gst-discoverer.c line 437

Comment 1 Tim-Philipp Müller 2010-10-23 16:31:38 UTC
Created attachment 173085 [details]
beginning of matroska file that triggers this
Comment 2 Sebastian Dröge (slomo) 2010-10-23 19:13:07 UTC
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;
 }
 
 /**
Comment 3 Sebastian Dröge (slomo) 2010-10-23 19:14:01 UTC
Also gst-discover should be versioned like gst-inspect-0.10, etc with an unversioned wrapper script.
Comment 4 Edward Hervey 2010-10-24 08:10:11 UTC
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.
Comment 5 Tim-Philipp Müller 2010-10-24 10:54:46 UTC
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.
Comment 6 Edward Hervey 2010-10-24 11:31:27 UTC
The beginning of that file isn't enough to trigger the issue here
Comment 7 Edward Hervey 2010-10-24 11:42:50 UTC
(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.
Comment 8 Edward Hervey 2010-10-24 14:19:10 UTC
Created attachment 173118 [details] [review]
discoverer: Don't ref a NULL caps
Comment 9 Edward Hervey 2010-10-24 14:19:14 UTC
Created attachment 173119 [details] [review]
discoverer: Get pad caps if we can't get negotiated caps

Better provide something than nothing
Comment 10 Tim-Philipp Müller 2010-10-24 15:32:34 UTC
Comment on attachment 173119 [details] [review]
discoverer: Get pad caps if we can't get negotiated caps

Works for me, thanks!
Comment 11 Edward Hervey 2010-10-25 07:31:43 UTC
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