aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-03-16 23:37:41 +0100
committerMax Kellermann <max@duempel.org>2011-03-16 23:37:41 +0100
commit4f293ecd6f4c7a07d72fbf0b9d0d454244b12c2a (patch)
tree830490ade657a93950dbcfba0e606dbaa5092af9 /src/output_thread.c
parentb6303313f0145c4caf58195ba4a85d2f4fa2967c (diff)
downloadmpd-4f293ecd6f4c7a07d72fbf0b9d0d454244b12c2a.tar.gz
mpd-4f293ecd6f4c7a07d72fbf0b9d0d454244b12c2a.tar.xz
mpd-4f293ecd6f4c7a07d72fbf0b9d0d454244b12c2a.zip
audio_format, output_thread: add more audio_format_valid() assertions
Diffstat (limited to '')
-rw-r--r--src/output_thread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index a5244c693..4e0446791 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -95,6 +95,8 @@ ao_filter_open(struct audio_output *ao,
struct audio_format *audio_format,
GError **error_r)
{
+ assert(audio_format_valid(audio_format));
+
/* the replay_gain filter cannot fail here */
if (ao->replay_gain_filter != NULL)
filter_open(ao->replay_gain_filter, audio_format, error_r);
@@ -136,6 +138,7 @@ ao_open(struct audio_output *ao)
assert(!ao->open);
assert(ao->pipe != NULL);
assert(ao->chunk == NULL);
+ assert(audio_format_valid(&ao->in_audio_format));
if (ao->fail_timer != NULL) {
/* this can only happen when this
@@ -164,6 +167,8 @@ ao_open(struct audio_output *ao)
return;
}
+ assert(audio_format_valid(filter_audio_format));
+
ao->out_audio_format = *filter_audio_format;
audio_format_mask_apply(&ao->out_audio_format,
&ao->config_audio_format);