rtmpsrc: error out if we get EOS immediately without any data

It's not really right to just go EOS as if nothing was wrong.
This commit is contained in:
Tim-Philipp Müller 2014-04-11 19:38:32 +01:00
parent ab3153b9a2
commit ab783acd7f

View file

@ -389,8 +389,14 @@ read_failed:
eos:
{
gst_buffer_unref (buf);
GST_DEBUG_OBJECT (src, "Reading data gave EOS");
return GST_FLOW_EOS;
if (src->cur_offset == 0) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Failed to read any data from stream, check your URL"));
return GST_FLOW_ERROR;
} else {
GST_DEBUG_OBJECT (src, "Reading data gave EOS");
return GST_FLOW_EOS;
}
}
}