winks: post error message on flow-unexpected

This commit is contained in:
Ole André Vadla Ravnås 2009-08-31 19:33:30 +02:00
parent 700f70e7a5
commit 00bc7860ff

View file

@ -1077,11 +1077,15 @@ error_alloc_buffer:
}
error_read_frame:
{
if (result != GST_FLOW_WRONG_STATE && result != GST_FLOW_UNEXPECTED) {
if (result == GST_FLOW_ERROR) {
GST_ELEMENT_ERROR (self, RESOURCE, READ,
("read failed: %s [0x%08x]", error_str, error_code),
("gst_ks_video_device_read_frame failed"));
}
else if (result == GST_FLOW_UNEXPECTED) {
GST_ELEMENT_ERROR (self, RESOURCE, READ,
("read failed"), ("gst_ks_video_device_read_frame failed"));
}
g_free (error_str);
gst_buffer_unref (buf);