summaryrefslogtreecommitdiffstats
path: root/audio/decode/dec_audio.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-29 18:05:55 +0200
committerwm4 <wm4@nowhere>2014-07-29 18:05:55 +0200
commit63d1d53d2fb89de0c7ff081f8b3bb78ee5e52520 (patch)
tree207b73bd9bc2f0390af127a283da5ddb737a2e56 /audio/decode/dec_audio.h
parent862d7d8a1a852fc6bb6dd13ca5db90f83b676579 (diff)
downloadmpv-63d1d53d2fb89de0c7ff081f8b3bb78ee5e52520.tar.bz2
mpv-63d1d53d2fb89de0c7ff081f8b3bb78ee5e52520.tar.xz
audio: ignore (some) decoding errors on initialization
It probably happens relatively often that the first packet (or even the first N packets) of a stream will fail to decode, but decoding will eventually succeed at a later point. Before commit 261506e3, this was handled by an explicit retry loop (although this was also for other purposes), but with then was changed to abort on the first error. This makes it impossible to decode some audio streams. Change this so that errors are ignored for the first 50 packets, which should make it equivalent to the old code.
Diffstat (limited to 'audio/decode/dec_audio.h')
-rw-r--r--audio/decode/dec_audio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/decode/dec_audio.h b/audio/decode/dec_audio.h
index 6d2c61d862..b76ff0b95c 100644
--- a/audio/decode/dec_audio.h
+++ b/audio/decode/dec_audio.h
@@ -37,6 +37,7 @@ struct dec_audio {
struct af_stream *afilter;
char *decoder_desc;
struct replaygain_data *replaygain_data;
+ int init_retries;
// set by decoder
struct mp_audio decoded; // decoded audio set by last decode_packet() call
int bitrate; // input bitrate, can change with VBR sources