From 4d97760993ddef99175f1dc2bcf1444fcd1943f9 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 17 May 2012 12:40:05 +0200 Subject: [PATCH] a52dec: trigger renegotiation upon changed stream channels Fixes #675451 --- ext/a52dec/gsta52dec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c index 290ae47670..e9e1e3a4d9 100644 --- a/ext/a52dec/gsta52dec.c +++ b/ext/a52dec/gsta52dec.c @@ -491,11 +491,16 @@ gst_a52dec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buffer) /* update stream information, renegotiate or re-streaminfo if needed */ need_reneg = FALSE; if (a52dec->sample_rate != sample_rate) { + GST_DEBUG_OBJECT (a52dec, "sample rate changed"); need_reneg = TRUE; a52dec->sample_rate = sample_rate; } if (flags) { + if (a52dec->stream_channels != (flags & (A52_CHANNEL_MASK | A52_LFE))) { + GST_DEBUG_OBJECT (a52dec, "stream channel flags changed, marking update"); + a52dec->flag_update = TRUE; + } a52dec->stream_channels = flags & (A52_CHANNEL_MASK | A52_LFE); }