lavfi: add error handling to end_frame().