huffyuv: Check and propagate function return values