Skip to content

Commit

Permalink
#88 Generic SpliceDescriptor handling
Browse files Browse the repository at this point in the history
  • Loading branch information
futzu authored Jul 17, 2023
1 parent 2f7591f commit 4daf46b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions threefive/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,18 +403,17 @@ def _encode_segments(self, nbin):
2: SegmentationDescriptor,
3: TimeDescriptor,
4: AudioDescriptor,

}


def splice_descriptor(bites):
"""
splice_descriptor reads the
descriptor tag and decodes and
returns an instance self._descriptor_map[tag]
replaced splice_descriptor
"""
tag = bites[0]
if tag not in descriptor_map:
return False
return SpliceDescriptor(bites)
spliced = descriptor_map[tag](bites)
spliced.decode()
return spliced

0 comments on commit 4daf46b

Please sign in to comment.