aboutsummaryrefslogtreecommitdiff
path: root/video/bink_decoder.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2014-01-09 21:28:43 -0500
committerMatthew Hoops2014-01-11 18:43:42 -0500
commitce82977ea152ea617b2e6c005b2bcfedb2a0e85c (patch)
tree2c8298722ae550a93e382fa827e18a1ff6d3a2d1 /video/bink_decoder.cpp
parentd2e31c8d67417d033b89cabc834cf3a1c363799c (diff)
downloadscummvm-rg350-ce82977ea152ea617b2e6c005b2bcfedb2a0e85c.tar.gz
scummvm-rg350-ce82977ea152ea617b2e6c005b2bcfedb2a0e85c.tar.bz2
scummvm-rg350-ce82977ea152ea617b2e6c005b2bcfedb2a0e85c.zip
VIDEO: Improve support for multiple Bink audio tracks
Diffstat (limited to 'video/bink_decoder.cpp')
-rw-r--r--video/bink_decoder.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 45dec0887b..bad34e8373 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -214,6 +214,16 @@ void BinkDecoder::readNextPacket() {
frame.bits = 0;
}
+VideoDecoder::AudioTrack *BinkDecoder::getAudioTrack(int index) {
+ // Bink audio track indexes are relative to the first audio track
+ Track *track = getTrack(index + 1);
+
+ if (!track || track->getTrackType() != Track::kTrackTypeAudio)
+ return 0;
+
+ return (AudioTrack *)track;
+}
+
BinkDecoder::VideoFrame::VideoFrame() : bits(0) {
}