From 1f9e0a15a13f9b1efece10515c57e5ed4683e9f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 21 Jul 2014 19:28:38 +0200 Subject: [PATCH] ad_lavc: drop questionable fallback code If the decoder didn't set a samplerate, it was initialized from the container samplerate. This probably didn't make much sense, because it's passed to the decoder on initialization (so it could definitely use it). It's an artifact from commit 66a9eb57 (which removed some Matroska-specific non- sense), and I've never seen it actually happen since it was made into a warning. Just get rid of it. --- audio/decode/ad_lavc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index ad00e65be6..4d892da32b 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -157,12 +157,6 @@ static int setup_format(struct dec_audio *da) MP_FATAL(da, "unsupported lavc format %s", av_get_sample_fmt_name(fmt)); da->decoded.rate = lavc_context->sample_rate; - if (!da->decoded.rate && sh_audio->wf) { - // If not set, try container samplerate. - // (Maybe this can't happen, and it's an artifact from the past.) - da->decoded.rate = sh_audio->wf->nSamplesPerSec; - MP_WARN(da, "using container rate.\n"); - } struct mp_chmap lavc_chmap; mp_chmap_from_lavc(&lavc_chmap, lavc_context->channel_layout);