def parse_fmt_list(formatsmap):
    formats = {}
    if (not formatsmap):
        return formats
    for format in formatsmap.split(','):
        s = format.split('/')
        (w, h) = s[1].split('x')
        formats[int(s[0])] = '{0}p'.format(h)
    return formats
def parse_fmt_list(formatsmap):
    formats = {}
    if (not formatsmap):
        return formats
    for format in formatsmap.split(','):
        s = format.split('/')
        (w, h) = s[1].split('x')
        formats[int(s[0])] = '{0}p'.format(h)
    return formats