multifilesink: post better error message when we run out of disk space

Map write errno ENOSPC to GST_RESOURCE_ERROR_NO_SPACE_LEFT.
This commit is contained in:
Peter Seiderer 2011-12-14 10:14:20 +01:00 committed by Tim-Philipp Müller
parent 2be912cb45
commit b82d9ca240

View file

@ -656,8 +656,15 @@ write_error:
return GST_FLOW_ERROR;
}
stdio_write_error:
GST_ELEMENT_ERROR (multifilesink, RESOURCE, WRITE,
("Error while writing to file."), (NULL));
switch (errno) {
case ENOSPC:
GST_ELEMENT_ERROR (multifilesink, RESOURCE, NO_SPACE_LEFT,
("Error while writing to file."), ("%s", g_strerror (errno)));
break;
default:
GST_ELEMENT_ERROR (multifilesink, RESOURCE, WRITE,
("Error while writing to file."), ("%s", g_strerror (errno)));
}
return GST_FLOW_ERROR;
}