All pastes #537572 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-04 19:36 UTC
rendered paste body
gst_base_src_get_range in gstbasesrc.c :

  /* now sync before pushing the buffer */
  status = gst_base_src_do_sync (src, *buf);
  switch (status) {
    case GST_CLOCK_EARLY:
      GST_DEBUG_OBJECT (src, "buffer too late!, returning anyway");
      break;
    case GST_CLOCK_OK:
      GST_DEBUG_OBJECT (src, "buffer ok");
      break;
    default:
      /* this case is triggered when we were waiting for the clock and
       * it got unlocked because we did a state change. We return 
       * WRONG_STATE in this case to stop the dataflow also get rid of the
       * produced buffer. */
      GST_DEBUG_OBJECT (src, "clock returned %d, not returning", status);
      gst_buffer_unref (*buf);
      *buf = NULL;
      ret = GST_FLOW_WRONG_STATE;
      break;
  }