'Raises DescriptorError'

def __init__(self, fileobj, length):

    r = BitReader(fileobj)
    try:
        self.ES_ID = r.bits(16)
        self.streamDependenceFlag = r.bits(1)
        self.URL_Flag = r.bits(1)
        self.OCRstreamFlag = r.bits(1)
        self.streamPriority = r.bits(5)
        if self.streamDependenceFlag:
            self.dependsOn_ES_ID = r.bits(16)
        if self.URL_Flag:
            URLlength = r.bits(8)
            self.URLstring = r.bytes(URLlength)
        if self.OCRstreamFlag:
            self.OCR_ES_Id = r.bits(16)
        tag = r.bits(8)
    except BitReaderError as e:
        raise DescriptorError(e)
    if (tag != DecoderConfigDescriptor.TAG):
        raise DescriptorError(('unexpected    DecoderConfigDescrTag    %d' % tag))
    assert r.is_aligned()
    self.decConfigDescr = DecoderConfigDescriptor.parse(fileobj)
