[Bug 763522] New: gst_element_query_position doesn't always return the right frame number

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Mar 12 07:29:32 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=763522

            Bug ID: 763522
           Summary: gst_element_query_position doesn't always return the
                    right frame number
    Classification: Platform
           Product: GStreamer
           Version: 1.7.90
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: gregoire at gentil.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 323743
  --> https://bugzilla.gnome.org/attachment.cgi?id=323743&action=edit
Log amc*:6

This might not be a bug, I don't know. It seems that on some rare occasions,
gst_element_query_position returns the real frame number+1 or the real frame
number-1.

My pipeline on Android 6.0.1 with gstreamer-1.7.90 is:

filesrc location=path ! queue ! decodebin ! queue ! identity ! glimagesink

On the identity element, I have a pad callback:

GstPad *pad = gst_element_get_static_pad(identity, "sink");
gst_pad_add_probe(pad, GST_PAD_PROBE_TYPE_BUFFER,
(GstPadProbeCallback)cb_have_data_0, data, NULL);

in which I do:

frameNbInc++;
gst_element_query_position(pipeline, GST_FORMAT_DEFAULT, &frameNb);
GST_DEBUG("%lld %lld %lld", frameNb, frameNbInc, frameNb - frameNbInc);



The debug log of amc*6 is attached.

On line 53 and 138, I have frameNb - frameNbInc == 1 while the delta between an
internal incremental counter frameNbInc and the frame number returned by
gst_element_query_position should be 2 and is 2 almost all the time.

The delta of -1 always happens after the "Queueing buffer", for instance lines
41 to 52, or lines 123 to 137.


Sometimes, the delta is +1 like on line 264. It seems that there was a race
condition between line 263 and 264.

Is this a bug? Or how can I be sure to have gst_element_query_position to
return the equivalent of an incremental number with the condition that the
system is not late, aka. everything runs smoothly like in this trace.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list