aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-10-05 14:52:30 +0200
committerMax Kellermann <max@duempel.org>2012-10-05 14:52:30 +0200
commitddc028333902bccd0b12f3834fdb63c4307ed530 (patch)
tree3d349bb304136ce1d11c6069e700220a7c7f8cb5 /src/decoder
parent03a401e4779a287d2760376a10ef4ea415803b00 (diff)
downloadmpd-ddc028333902bccd0b12f3834fdb63c4307ed530.tar.gz
mpd-ddc028333902bccd0b12f3834fdb63c4307ed530.tar.xz
mpd-ddc028333902bccd0b12f3834fdb63c4307ed530.zip
decoder/ffmpeg: remove duplicate sample format error message
Diffstat (limited to '')
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index b63094404..cbc23f546 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -485,11 +485,16 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
return;
}
+ const enum sample_format sample_format =
+ ffmpeg_sample_format(codec_context);
+ if (sample_format == SAMPLE_FORMAT_UNDEFINED)
+ return;
+
GError *error = NULL;
struct audio_format audio_format;
if (!audio_format_init_checked(&audio_format,
codec_context->sample_rate,
- ffmpeg_sample_format(codec_context),
+ sample_format,
codec_context->channels, &error)) {
g_warning("%s", error->message);
g_error_free(error);