From ddc028333902bccd0b12f3834fdb63c4307ed530 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Oct 2012 14:52:30 +0200 Subject: decoder/ffmpeg: remove duplicate sample format error message --- src/decoder/ffmpeg_decoder_plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3