summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-15 21:12:01 +0100
committerwm4 <wm4@nowhere>2013-11-15 21:12:01 +0100
commit3ded03b1f97fc142a5de859da510989dcb36d00b (patch)
tree693bf073cfe1e14c3d11ab429fa0bcb2ca2ac394
parenta9d98082aa027a9e4f562acb9228df40592b236c (diff)
downloadmpv-3ded03b1f97fc142a5de859da510989dcb36d00b.tar.bz2
mpv-3ded03b1f97fc142a5de859da510989dcb36d00b.tar.xz
dec_audio: adjust "large" decoding amount
This used to be in bytes, now it's in samples. Divide the value by 8 (assuming a typical audio format, float samples with 2 channels). Fix some editing mistake or non-sense about the extra buffering added (1<<x instead of x<<5). Also sneak in a s/MPlayer/mpv/.
-rw-r--r--audio/decode/dec_audio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index c9b116d4ea..0aee681def 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -319,18 +319,18 @@ int decode_audio(sh_audio_t *sh_audio, struct mp_audio_buffer *outbuf,
int decsamples = (minsamples - buffered) / filter_multiplier;
// + some extra for possible filter buffering
- decsamples += 1 << unitsize;
+ decsamples += unitsize << 5;
if (huge_filter_buffer) {
/* Some filter must be doing significant buffering if the estimated
* input length didn't produce enough output from filters.
- * Feed the filters 2k bytes at a time until we have enough output.
- * Very small amounts could make filtering inefficient while large
- * amounts can make MPlayer demux the file unnecessarily far ahead
+ * Feed the filters 250 samples at a time until we have enough
+ * output. Very small amounts could make filtering inefficient while
+ * large amounts can make mpv demux the file unnecessarily far ahead
* to get audio data and buffer video frames in memory while doing
* so. However the performance impact of either is probably not too
* significant as long as the value is not completely insane. */
- decsamples = 2000;
+ decsamples = 250;
}
/* if this iteration does not fill buffer, we must have lots