commit the fdsrc fix from Pedro Corte-Real

Original commit message from CVS:
commit the fdsrc fix from Pedro Corte-Real
This commit is contained in:
Christian Schaller 2002-11-28 14:13:51 +00:00
parent 2d9c2e484b
commit 63a4cb67c2
2 changed files with 12 additions and 0 deletions

View file

@ -191,6 +191,12 @@ gst_fdsrc_get(GstPad *pad)
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
}
if (readbytes == -1) {
g_error ("Error reading from file descriptor. Ending stream.\n");
gst_element_set_eos (GST_ELEMENT (src));
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
}
GST_BUFFER_OFFSET (buf) = src->curoffset;
GST_BUFFER_SIZE (buf) = readbytes;
GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE;

View file

@ -191,6 +191,12 @@ gst_fdsrc_get(GstPad *pad)
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
}
if (readbytes == -1) {
g_error ("Error reading from file descriptor. Ending stream.\n");
gst_element_set_eos (GST_ELEMENT (src));
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
}
GST_BUFFER_OFFSET (buf) = src->curoffset;
GST_BUFFER_SIZE (buf) = readbytes;
GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE;