def parse_content_type(content_type):
    if (not content_type):
        return {}
    ctr = re.search('(?P<mimetype>[^/]+/[^;]+)(?:;\\s*codecs="?(?P<codecs>[^"]+))?', content_type)
    if ctr:
        (mimetype, codecs) = ctr.groups()
        f = parse_codecs(codecs)
        f['ext'] = mimetype2ext(mimetype)
        return f
    return {}
def parse_content_type(content_type):
    if (not content_type):
        return {}
    ctr = re.search('(?P<mimetype>[^/]+/[^;]+)(?:;\\s*codecs="?(?P<codecs>[^"]+))?', content_type)
    if ctr:
        (mimetype, codecs) = ctr.groups()
        f = parse_codecs(codecs)
        f['ext'] = mimetype2ext(mimetype)
        return f
    return {}