From addfcf9ce339f487c94c36f6e72fc7e736586015 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 Nov 2013 00:11:35 +0100 Subject: audio: better rejection of invalid formats This includes the case when lavc decodes audio with more than 8 channels, which our audio chain currently does not support. the changes in ad_lavc.c are just simplifications. The code tried to avoid overriding global parameters if it found something invalid, but that is not needed anymore. --- audio/audio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/audio.h') diff --git a/audio/audio.h b/audio/audio.h index 54ac2d5aac..8dbdc4e710 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -47,6 +47,7 @@ void mp_audio_set_channels_old(struct mp_audio *mpa, int num_channels); void mp_audio_set_channels(struct mp_audio *mpa, const struct mp_chmap *chmap); void mp_audio_copy_config(struct mp_audio *dst, const struct mp_audio *src); bool mp_audio_config_equals(const struct mp_audio *a, const struct mp_audio *b); +bool mp_audio_config_valid(const struct mp_audio *mpa); char *mp_audio_fmt_to_str(int srate, const struct mp_chmap *chmap, int format); char *mp_audio_config_to_str(struct mp_audio *mpa); -- cgit v1.2.3