def select_mlti_data(self, mlti_chunk, selection):
        """ Takes a MLTI-chunk from an SDP OpaqueData and a rule selection
        Returns the codec data based on the given rule selection """
        if not mlti_chunk.startswith('MLTI'):
            print('MLTI tag missing')
            return mlti_chunk
        idx = 4 # past 'MLTI'
        numrules = struct.unpack('!H', mlti_chunk[idx:idx + 2])[0]
        idx += 2
        rules = []
        for i in range(0, numrules):
            rules.append(struct.unpack('!H', mlti_chunk[idx:idx + 2])[0])
            idx += 2
        if selection > numrules:
            return 0
        numcodecs = struct.unpack('!H', mlti_chunk[idx:idx + 2])[0]
        idx += 2
        codecs = []
        for i in range(numcodecs):
            codec_length = struct.unpack('!I', mlti_chunk[idx:idx + 4])[0]
            idx += 4 # skip over codec length integer
            codecs.append(mlti_chunk[idx:idx + codec_length])
            idx += codec_length # skip over codec length worth of data
        return codecs[rules[selection]]