diff options
author | wm4 <wm4@nowhere> | 2014-03-30 07:34:43 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-30 07:34:43 +0200 |
commit | ae448e198fab311747104474e38a4fbab4e44a06 (patch) | |
tree | 2d6bd12b0bb0f22fedd059c0600ee0b78fb8ab8a | |
parent | 9be2f6b9f841d0169afb06aa82a8eb4f039bbdbe (diff) | |
download | mpv-ae448e198fab311747104474e38a4fbab4e44a06.tar.bz2 mpv-ae448e198fab311747104474e38a4fbab4e44a06.tar.xz |
audio: remove sample rate limit checks
This played the file at a wrong sample rate if the rate was out of
certain bounds.
A comment says this was for the sake of libaf/af_resample.c. This
resampler has been long removed. Our current resampler
(libav/swresample) checks supported sample rates on reconfiguration, and
will error out if a sample rate is not supported. And I think that is
the correct behavior.
-rw-r--r-- | player/audio.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/player/audio.c b/player/audio.c index e7c2b8baf4..65c4ad74dd 100644 --- a/player/audio.c +++ b/player/audio.c @@ -62,14 +62,8 @@ static int build_afilter_chain(struct MPContext *mpctx) new_srate = in_format.rate; else { new_srate = in_format.rate * opts->playback_speed; - if (new_srate != out_format.rate) { - // limits are taken from libaf/af_resample.c - if (new_srate < 8000) - new_srate = 8000; - if (new_srate > 192000) - new_srate = 192000; + if (new_srate != out_format.rate) opts->playback_speed = new_srate / (double)in_format.rate; - } } return audio_init_filters(d_audio, new_srate, &out_format.rate, &out_format.channels, &out_format.format); |