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 745073 - playbin, discoverer: criticals when switching from pull mode to push mode
playbin, discoverer: criticals when switching from pull mode to push mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-24 09:40 UTC by Jussi Pakkanen
Modified: 2015-06-14 20:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample code (1.14 KB, text/x-csrc)
2015-02-24 09:40 UTC, Jussi Pakkanen
Details

Description Jussi Pakkanen 2015-02-24 09:40:04 UTC
Created attachment 297744 [details]
Sample code

Using GstDiscoverer for ogg files works fine if you specify the uri as file:///path/to/file.ogg. However if you open a fd to the same file and try to discover uri fd://<fdnum>, then you get the following:

(gsttest:27197): GStreamer-CRITICAL **: pullrange on pad typefind:sink but it was not activated in pull mode

This does work if you use the fd file name as an uri like this: file:///proc/self/fd/<fdnum>.

Non-ogg files seem to work.

Attached is a piece of sample code to demonstrate the issue.
Comment 1 James Henstridge 2015-02-25 05:36:35 UTC
If I comment out all the print_duration calls but the last, fdsrc seems to work correctly.  The problem seems to be related to reconfiguring the pipeline from the normal file source to the fd source.

I can reproduce this with the standard gst-discoverer-1.0 tool too.  The following succeeds:

    gst-discoverer-1.0 fd://3 3< file1.ogg

And the following gives an error when discovering the second file:

    gst-discoverer-1.0 file1.ogg fd://3 3< file2.ogg

The output on dicovering the second URI is:

    Analyzing fd://3

    (gst-discoverer-1.0:22235): GStreamer-CRITICAL **: pullrange on pad typefind:sink but it was not activated in pull mode
    Done discovering fd://3
    An error was encountered while discovering the file
     GStreamer encountered a general stream error.

Further evidence that this is related to pipeline reconfiguration, discovering two file descriptor sources seems to work fine:

    gst-discoverer-1.0 fd://3 fd://4 3< file1.ogg 4< file2.ogg

For reference, this was using GStreamer 1.4.5 from Ubuntu Vivid.
Comment 2 Tim-Philipp Müller 2015-02-25 10:32:50 UTC
Also affects playbin(!). Also happens in git master.

Easier way to reproduce:

 gst-discoverer-1.0 file1.ogg pushfile:///path/to/file2.ogg
Comment 3 Sebastian Dröge (slomo) 2015-03-12 12:59:32 UTC
This fixes part of the problem

commit 53e8e7da75e4eeaa1054eb24e50568b32d8bd6b1
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Mar 12 12:59:57 2015 +0000

    typefind: Reset segment when deactivating pull mode or not running in pull mode
    
    We use the segment format to detect if we run the streaming thread or not.
    Without resetting we might believe we do so, although we only did in the past
    and are now running in e.g. push mode.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745073
Comment 4 Sebastian Dröge (slomo) 2015-03-12 13:01:29 UTC
Actually all problems :)
Comment 5 Tim-Philipp Müller 2015-06-14 20:38:29 UTC
Follow up:

 commit 7be8acbfb0e08ea8bcd6833a7e0a71d1132f6b14
 Author: Tim-Philipp Müller <tim@centricular.com>
 Date:   Sun Jun 14 20:48:29 2015 +0100

    typefindelement: reset segment only once streaming has stopped
    
    Fixes the occasional criticals in the discoverer unit test.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745073
    https://bugzilla.gnome.org/show_bug.cgi?id=750823