summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-21 19:28:38 +0200
committerwm4 <wm4@nowhere>2014-07-21 19:29:58 +0200
commit1f9e0a15a13f9b1efece10515c57e5ed4683e9f3 (patch)
tree548b33c3bdc5ddda1139b0f38600ca95eaeaef3e
parent967add9f0f5658b449e94cd33c44e72ae8cf76a7 (diff)
downloadmpv-1f9e0a15a13f9b1efece10515c57e5ed4683e9f3.tar.bz2
mpv-1f9e0a15a13f9b1efece10515c57e5ed4683e9f3.tar.xz
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.
-rw-r--r--audio/decode/ad_lavc.c6
1 files changed, 0 insertions, 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);