#define gst_buffer_new_and_alloc(s) gst_buffer_new_allocate(NULL, s, 0)
-#define GST_FLOW_UNEXPECTED GST_FLOW_EOS
-
#define GST_BUFFER_TIMESTAMP GST_BUFFER_PTS
#define GST_BUFFER_TIMESTAMP_IS_VALID GST_BUFFER_PTS_IS_VALID
if (G_UNLIKELY (best == NULL)) {
ret = func (pads, best, NULL, buffer_user_data);
if (ret == GST_FLOW_OK)
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
goto done;
}
/* pad was EOS, we can refuse this data */
if (G_UNLIKELY (GST_COLLECT_PADS2_STATE_IS_SET (data,
GST_COLLECT_PADS2_STATE_EOS)))
- goto unexpected;
+ goto eos;
/* see if we need to clip */
if (pads->clip_func) {
if (G_UNLIKELY (outbuf == NULL))
goto clipped;
- if (G_UNLIKELY (ret == GST_FLOW_UNEXPECTED))
- goto unexpected;
+ if (G_UNLIKELY (ret == GST_FLOW_EOS))
+ goto eos;
else if (G_UNLIKELY (ret != GST_FLOW_OK))
goto error;
}
ret = GST_FLOW_WRONG_STATE;
goto unlock_done;
}
-unexpected:
+eos:
{
/* we should not post an error for this, just inform upstream that
* we don't expect anything anymore */
GST_DEBUG ("pad %s:%s is eos", GST_DEBUG_PAD_NAME (pad));
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
goto unlock_done;
}
clipped: