[Bug 748055] avfvideosrc: get connection and input clock early

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 12 08:37:24 PDT 2015


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

Ilya Konstantinov <ilya.konstantinov at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---
           Assignee|gstreamer-bugs at lists.freede |ilya.konstantinov at gmail.com
                   |sktop.org                   |

--- Comment #2 from Ilya Konstantinov <ilya.konstantinov at gmail.com> ---
Created attachment 305157
  --> https://bugzilla.gnome.org/attachment.cgi?id=305157&action=edit
avfvideosrc: set sample buffer delegate last

Oops, the previous patch would cause this sporadic error:

(<unknown>:1161): GStreamer-CRITICAL **: _gst_util_uint64_scale: assertion
'denom != 0' failed

occurring in:

    now = CMClockGetTime(inputClock); // <-- inputClock == nil
    // ^ now == 0
    input_clock_now = gst_util_uint64_scale (GST_SECOND,
        now.value, now.timescale); // <-- critical error

The problem is caused by:

    [output setSampleBufferDelegate:self
                              queue:workerQueue];
    [session addOutput:output];

    ...
    // ERROR: At this point, inputClock == nil
    //        and the delegate can be called already
    inputClock = ((AVCaptureInputPort *)connection.inputPorts[0]).clock;

The solution is simple -- postpone setting sample buffer delegate to the end.

-- 
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