littlewater / gst123

Automatically exported from code.google.com/p/gst123
0 stars 0 forks source link

Assumes that playbin's video-sink is always a GstBin #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a video sink that handles encoded video
2. Play a file with such a video stream
3. Get funny g_criticals()

(gst123:1674): GLib-GObject-WARNING **: invalid cast from `GstXvImageSink' to 
`GstBin'

(gst123:1674): GStreamer-CRITICAL **: gst_bin_iterate_sinks: assertion 
`GST_IS_BIN (bin)' failed

(gst123:1674): GStreamer-CRITICAL **: gst_iterator_next: assertion `it != NULL' 
failed

(gst123:1674): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE 
(value)' failed

Reason is this line in gst123.cc:
          GstIterator *iterator = gst_bin_iterate_sinks (GST_BIN (videosink));

The video-sink of playbin can be a GstBin, but it can also be a GstElement. You 
should only iterate over it if it is a GstBin, otherwise just use the element 
itself.

Original issue reported on code.google.com by sl...@coaxion.net on 30 Apr 2013 at 7:45

GoogleCodeExporter commented 9 years ago
This patch would fix it, please apply.

Original comment by sl...@coaxion.net on 5 Nov 2013 at 11:09

GoogleCodeExporter commented 9 years ago
Also fix compilation and use another GLib function for portability.

Original comment by sl...@coaxion.net on 5 Nov 2013 at 11:15

GoogleCodeExporter commented 9 years ago

Original comment by sl...@coaxion.net on 5 Nov 2013 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
I now applied the 
0001-Don-t-assume-that-the-video-sink-is-always-a-GstBin.patch and tested it; 
criticals are gone now on my ubuntu 14.04 test system which used to have 
problems without the patch.

About the 0002-Use-g_lstat-instead-of-lstat-for-portability-and-inc.patch - 
I've used a different approach and just added the missing #include statement 
while still using lstat() - gst123 is not intended to be portable to non-UNIX 
systems where lstat is unavailable.

Original comment by Stefan.W...@gmail.com on 24 Apr 2014 at 12:39