From 03fc454457dee8023a58461a3aa468fbd55ac80a Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 1 Sep 2015 16:08:11 -0300 Subject: omxaacdec: Do not accept unknown layouts It was defaulting to RAW when an unknown layout was received but the caps template would actually forbid that on the caps query or accept-caps anyway. --- omx/gstomxaacdec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/omx/gstomxaacdec.c b/omx/gstomxaacdec.c index 6ecf9d5..66d881d 100644 --- a/omx/gstomxaacdec.c +++ b/omx/gstomxaacdec.c @@ -148,8 +148,10 @@ gst_omx_aac_dec_set_format (GstOMXAudioDec * dec, GstOMXPort * port, aac_param.eAACStreamFormat = OMX_AUDIO_AACStreamFormatADIF; else if (strcmp (stream_format, "raw") == 0) aac_param.eAACStreamFormat = OMX_AUDIO_AACStreamFormatRAW; - else /* fallback instead of failing */ - aac_param.eAACStreamFormat = OMX_AUDIO_AACStreamFormatRAW; + else { + GST_ERROR_OBJECT (self, "Unexpected format: %s", stream_format); + return FALSE; + } err = gst_omx_component_set_parameter (dec->dec, OMX_IndexParamAudioAac, -- cgit v1.2.3