def frame_from_timecode(timecode, fps=24.0):
    """
    Return the frame corresponding to the given timecode, for the given fps.

    :param timecode: String, timecode.
    :param fps: Float representing frames-per-second.
    :returns: Int representing a number of frames.
    """

    # Return a frame of 0 if we don't have a valid timecode or we have a drop
    # frame timecode (drop frame is unsupported).
    if not timecode or ":" not in timecode or ";" in timecode:
        return 0

    (hour, minute, second, frame) = timecode.split(":")
    hours = int(hour)
    minutes = int(minute)
    seconds = int(second)
    frames = int(frame)

    seconds = (hours * 60 * 60) + (minutes * 60) + seconds
    frames = (seconds * fps) + frames

    return int(round(frames))