Only try to get the channel-mask if it is set

This commit is contained in:
Sebastian Dröge 2012-09-14 13:27:33 +02:00
parent afbc23ceed
commit b07cd212ac

View file

@ -444,7 +444,8 @@ gst_amc_audio_dec_set_src_caps (GstAmcAudioDec * self, GstAmcFormat * format)
} }
/* Not always present */ /* Not always present */
gst_amc_format_get_int (format, "channel-mask", (gint *) & channel_mask); if (gst_amc_format_contains_key (format, "channel-mask"))
gst_amc_format_get_int (format, "channel-mask", (gint *) & channel_mask);
if (self->positions) if (self->positions)
g_free (self->positions); g_free (self->positions);