Also add some more output format checks to the audio decoder

This commit is contained in:
Sebastian Dröge 2012-10-09 10:14:50 +02:00
parent a870e6a5c3
commit 2f3b2c586f

View file

@ -456,6 +456,11 @@ gst_amc_audio_dec_set_src_caps (GstAmcAudioDec * self, GstAmcFormat * format)
return FALSE; return FALSE;
} }
if (rate == 0 || channels == 0) {
GST_ERROR_OBJECT (self, "Rate or channels not set");
return FALSE;
}
/* Not always present */ /* Not always present */
if (gst_amc_format_contains_key (format, "channel-mask")) if (gst_amc_format_contains_key (format, "channel-mask"))
gst_amc_format_get_int (format, "channel-mask", (gint *) & channel_mask); gst_amc_format_get_int (format, "channel-mask", (gint *) & channel_mask);