Commit ddc02833 authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: remove duplicate sample format error message

parent 03a401e4
...@@ -485,11 +485,16 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input) ...@@ -485,11 +485,16 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
return; return;
} }
const enum sample_format sample_format =
ffmpeg_sample_format(codec_context);
if (sample_format == SAMPLE_FORMAT_UNDEFINED)
return;
GError *error = NULL; GError *error = NULL;
struct audio_format audio_format; struct audio_format audio_format;
if (!audio_format_init_checked(&audio_format, if (!audio_format_init_checked(&audio_format,
codec_context->sample_rate, codec_context->sample_rate,
ffmpeg_sample_format(codec_context), sample_format,
codec_context->channels, &error)) { codec_context->channels, &error)) {
g_warning("%s", error->message); g_warning("%s", error->message);
g_error_free(error); g_error_free(error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment