summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-07-26 14:51:23 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-07-26 14:51:23 +0000
commit29b130eb2c418f305dbb5668a83e292641604894 (patch)
treefbbaaacbea98ae125cc9f1d712237aa86113b06b
parent5e668971ce54761cf5ca1e1b2d84030844f96eb7 (diff)
downloadxine-lib-29b130eb2c418f305dbb5668a83e292641604894.tar.gz
xine-lib-29b130eb2c418f305dbb5668a83e292641604894.tar.bz2
do bounds checking on audio_track_map to never use audio channels which
aren't there CVS patchset: 2356 CVS date: 2002/07/26 14:51:23
-rw-r--r--src/xine-engine/audio_decoder.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index 5c1e31288..b40675912 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_decoder.c,v 1.81 2002/07/25 17:11:51 mroi Exp $
+ * $Id: audio_decoder.c,v 1.82 2002/07/26 14:51:23 mroi Exp $
*
*
* functions that implement audio decoding
@@ -221,8 +221,12 @@ void *audio_decoder_loop (void *this_gen) {
} else
audio_type = this->audio_track_map[0];
- } else
- audio_type = this->audio_track_map[this->audio_channel_user];
+ } else {
+ if (this->audio_channel_user <= this->audio_track_map_entries)
+ audio_type = this->audio_track_map[this->audio_channel_user];
+ else
+ audio_type = -1;
+ }
/* now, decode this buffer if it's the right audio type */