summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-17 23:01:43 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-17 23:01:43 +0000
commita3efdf57df6e19bac8d941ac2df557f6bebee4c3 (patch)
tree7e4e3d35504adad1cbe0838e6f455fb585680908 /ext
parent59394d1f895783c60e2bb3be209e1b5d7dae0fe2 (diff)
downloadgst-plugins-bad-a3efdf57df6e19bac8d941ac2df557f6bebee4c3.tar.gz
gst-plugins-bad-a3efdf57df6e19bac8d941ac2df557f6bebee4c3.tar.bz2
gst-plugins-bad-a3efdf57df6e19bac8d941ac2df557f6bebee4c3.zip
ext/faad/gstfaad.c: Fix off-by-one bug. Fixes warnings during playback of sincity.mp4 when fixating to six channels i...
Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_srcgetcaps): Fix off-by-one bug. Fixes warnings during playback of sincity.mp4 when fixating to six channels in Totem.
Diffstat (limited to 'ext')
-rw-r--r--ext/faad/gstfaad.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index 20059646..444437a9 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -316,18 +316,18 @@ gst_faad_srcgetcaps (GstPad * pad)
{
GstFaad *faad = GST_FAAD (gst_pad_get_parent (pad));
static GstAudioChannelPosition *supported_positions = NULL;
- static gint num_supported_positions = LFE_CHANNEL - FRONT_CHANNEL_CENTER;
+ static gint num_supported_positions = LFE_CHANNEL - FRONT_CHANNEL_CENTER + 1;
GstCaps *templ;
if (!supported_positions) {
- guchar *supported_fpos = g_new0 (guchar,
- LFE_CHANNEL - FRONT_CHANNEL_CENTER);
+ guchar *supported_fpos = g_new0 (guchar, num_supported_positions);
gint n;
- for (n = 0; n < LFE_CHANNEL - FRONT_CHANNEL_CENTER; n++) {
+ for (n = 0; n <= num_supported_positions; n++) {
supported_fpos[n] = n + FRONT_CHANNEL_CENTER;
}
- supported_positions = gst_faad_chanpos_to_gst (supported_fpos, n);
+ supported_positions = gst_faad_chanpos_to_gst (supported_fpos,
+ num_supported_positions);
g_free (supported_fpos);
}