Skip to content

Commit

Permalink
fix: DTS:X inputs with latest mediainfolib was causing an up-mix chan…
Browse files Browse the repository at this point in the history
…nel count error
  • Loading branch information
jessielw committed Jan 19, 2024
1 parent 391d81b commit 5190e23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deezy/track_info/mediainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ def _get_channels(mi_object, track_index):
"""
Get the number of audio channels for the specified track.
The added complexity for 'check_other' is to ensure we get a report
of the highest potential channel count.
Args:
mi_object (MediaInfo): A MediaInfo object containing information about the media file.
track_index (int): The index of the track to extract information from.
Expand All @@ -243,7 +246,7 @@ def _get_channels(mi_object, track_index):
"""
track = mi_object.audio_tracks[track_index]
base_channels = track.channel_s
check_other = search(r"\d+", str(track.other_channel_s[0]))
check_other = search(r"\d+", str(track.channel_s__original))
if check_other:
return max(int(base_channels), int(check_other.group()))
else:
Expand Down

0 comments on commit 5190e23

Please sign in to comment.