Commit 47a1da90 authored by Wim Taymans's avatar Wim Taymans

GST_FLOW_UNEXPECTED -> GST_FLOW_EOS

parent 03408a47
......@@ -853,7 +853,7 @@ gst_text_overlay_collected (GstCollectPads * pads, gpointer data)
overlay->text_collect_data);
}
gst_pad_push_event (overlay->srcpad, gst_event_new_eos ());
ret = GST_FLOW_UNEXPECTED;
ret = GST_FLOW_EOS;
goto done;
}
......
......@@ -1517,7 +1517,7 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
/* check for the end of the segment */
if (dvdemux->time_segment.stop != -1 && next_ts > dvdemux->time_segment.stop)
ret = GST_FLOW_UNEXPECTED;
ret = GST_FLOW_EOS;
else
ret = GST_FLOW_OK;
......@@ -1785,7 +1785,7 @@ pause:
GST_INFO_OBJECT (dvdemux, "pausing task, %s", gst_flow_get_name (ret));
dvdemux->running = FALSE;
gst_pad_pause_task (dvdemux->sinkpad);
if (ret == GST_FLOW_UNEXPECTED) {
if (ret == GST_FLOW_EOS) {
GST_LOG_OBJECT (dvdemux, "got eos");
/* perform EOS logic */
if (dvdemux->time_segment.flags & GST_SEEK_FLAG_SEGMENT) {
......@@ -1795,7 +1795,7 @@ pause:
} else {
gst_dvdemux_push_event (dvdemux, gst_event_new_eos ());
}
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors or not-linked we post an error message */
GST_ELEMENT_ERROR (dvdemux, STREAM, FAILED,
(NULL), ("streaming stopped, reason %s", gst_flow_get_name (ret)));
......
......@@ -336,9 +336,9 @@ pause:
GST_INFO_OBJECT (pngdec, "pausing task, reason %s",
gst_flow_get_name (ret));
gst_pad_pause_task (pngdec->sinkpad);
if (ret == GST_FLOW_UNEXPECTED) {
if (ret == GST_FLOW_EOS) {
gst_pad_push_event (pngdec->srcpad, gst_event_new_eos ());
} else if (ret < GST_FLOW_UNEXPECTED || ret == GST_FLOW_NOT_LINKED) {
} else if (ret < GST_FLOW_EOS || ret == GST_FLOW_NOT_LINKED) {
GST_ELEMENT_ERROR (pngdec, STREAM, FAILED,
(_("Internal data stream error.")),
("stream stopped, reason %s", gst_flow_get_name (ret)));
......@@ -546,9 +546,9 @@ pause:
GST_INFO_OBJECT (pngdec, "pausing task, reason %s",
gst_flow_get_name (ret));
gst_pad_pause_task (pngdec->sinkpad);
if (ret == GST_FLOW_UNEXPECTED) {
if (ret == GST_FLOW_EOS) {
gst_pad_push_event (pngdec->srcpad, gst_event_new_eos ());
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
GST_ELEMENT_ERROR (pngdec, STREAM, FAILED,
(_("Internal data stream error.")),
("stream stopped, reason %s", gst_flow_get_name (ret)));
......@@ -699,7 +699,7 @@ gst_pngdec_sink_event (GstPad * pad, GstEvent * event)
{
GST_LOG_OBJECT (pngdec, "EOS");
gst_pngdec_libpng_clear (pngdec);
pngdec->ret = GST_FLOW_UNEXPECTED;
pngdec->ret = GST_FLOW_EOS;
res = gst_pad_push_event (pngdec->srcpad, event);
break;
}
......
......@@ -720,7 +720,7 @@ gst_dv1394src_create (GstPushSrc * psrc, GstBuffer ** buf)
error_while_polling:
{
GST_ELEMENT_ERROR (dv1394src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
return GST_FLOW_UNEXPECTED;
return GST_FLOW_EOS;
}
told_to_stop:
{
......
......@@ -455,7 +455,7 @@ gst_hdv1394src_create (GstPushSrc * psrc, GstBuffer ** buf)
error_while_polling:
{
GST_ELEMENT_ERROR (dv1394src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
return GST_FLOW_UNEXPECTED;
return GST_FLOW_EOS;
}
told_to_stop:
{
......
......@@ -801,7 +801,7 @@ gst_wavpack_parse_pull_buffer (GstWavpackParse * wvparse, gint64 offset,
if (offset + size > wvparse->upstream_length) {
GST_DEBUG_OBJECT (wvparse, "EOS: %" G_GINT64_FORMAT " + %u > %"
G_GINT64_FORMAT, offset, size, wvparse->upstream_length);
flow_ret = GST_FLOW_UNEXPECTED;
flow_ret = GST_FLOW_EOS;
goto done;
}
}
......@@ -820,7 +820,7 @@ gst_wavpack_parse_pull_buffer (GstWavpackParse * wvparse, gint64 offset,
", got only %u of %u bytes", offset, GST_BUFFER_SIZE (buf), size);
gst_buffer_unref (buf);
buf = NULL;
flow_ret = GST_FLOW_UNEXPECTED;
flow_ret = GST_FLOW_EOS;
}
done:
......@@ -1037,7 +1037,7 @@ gst_wavpack_parse_find_marker (guint8 * buf, guint size)
static GstFlowReturn
gst_wavpack_parse_resync_loop (GstWavpackParse * parse, WavpackHeader * header)
{
GstFlowReturn flow_ret = GST_FLOW_UNEXPECTED;
GstFlowReturn flow_ret = GST_FLOW_EOS;
GstBuffer *buf = NULL;
......@@ -1148,7 +1148,7 @@ pause:
GST_LOG_OBJECT (parse, "pausing task, reason %s", reason);
gst_pad_pause_task (parse->sinkpad);
if (flow_ret == GST_FLOW_UNEXPECTED && parse->srcpad) {
if (flow_ret == GST_FLOW_EOS && parse->srcpad) {
if (parse->segment.flags & GST_SEEK_FLAG_SEGMENT) {
GstClockTime stop;
......@@ -1164,8 +1164,7 @@ pause:
GST_LOG_OBJECT (parse, "Sending EOS, at end of stream");
gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
}
} else if (flow_ret == GST_FLOW_NOT_LINKED
|| flow_ret < GST_FLOW_UNEXPECTED) {
} else if (flow_ret == GST_FLOW_NOT_LINKED || flow_ret < GST_FLOW_EOS) {
GST_ELEMENT_ERROR (parse, STREAM, FAILED,
(_("Internal data stream error.")), ("stream stopped, reason %s",
reason));
......
......@@ -351,7 +351,7 @@ gst_image_freeze_sink_bufferalloc (GstPad * pad, guint64 offset, guint size,
gst_flow_get_name (ret));
} else {
/* Let upstream go EOS if we already have a buffer */
ret = GST_FLOW_UNEXPECTED;
ret = GST_FLOW_EOS;
}
gst_object_unref (self);
......@@ -608,7 +608,7 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event)
&stop_type, &stop);
gst_event_unref (event);
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
if (format != GST_FORMAT_TIME && format != GST_FORMAT_DEFAULT) {
GST_ERROR_OBJECT (pad, "Seek in invalid format: %s",
......@@ -727,7 +727,7 @@ gst_image_freeze_sink_chain (GstPad * pad, GstBuffer * buffer)
GST_DEBUG_OBJECT (pad, "Already have a buffer, dropping");
gst_buffer_unref (buffer);
g_mutex_unlock (self->lock);
return GST_FLOW_UNEXPECTED;
return GST_FLOW_EOS;
}
self->buffer = buffer;
......
......@@ -1304,6 +1304,6 @@ eos:
GST_DEBUG_OBJECT (self, "no data available, must be EOS");
gst_buffer_unref (outbuf);
gst_pad_push_event (self->src, gst_event_new_eos ());
return GST_FLOW_UNEXPECTED;
return GST_FLOW_EOS;
}
}
......@@ -960,7 +960,7 @@ gst_videomixer2_collected (GstCollectPads2 * pads, GstVideoMixer2 * mix)
if (output_start_time >= mix->segment.stop) {
GST_DEBUG_OBJECT (mix, "Segment done");
gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
ret = GST_FLOW_UNEXPECTED;
ret = GST_FLOW_EOS;
goto done;
}
......@@ -979,7 +979,7 @@ gst_videomixer2_collected (GstCollectPads2 * pads, GstVideoMixer2 * mix)
} else if (res == -1) {
GST_DEBUG_OBJECT (mix, "All sinkpads are EOS -- forwarding");
gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
ret = GST_FLOW_UNEXPECTED;
ret = GST_FLOW_EOS;
goto done;
} else if (res == -2) {
GST_ERROR_OBJECT (mix, "Error collecting buffers");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment