summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-04 23:30:01 +0100
committerwm4 <wm4@nowhere>2013-12-04 23:30:01 +0100
commit2bcfb49a390a928c535cba7cab2b4136f27fceca (patch)
tree56dcc9c91b6f889aa6e19570800e874f3b83317b
parente9f49ea84de06e657067c16d9f43d531ef22b062 (diff)
downloadmpv-2bcfb49a390a928c535cba7cab2b4136f27fceca.tar.bz2
mpv-2bcfb49a390a928c535cba7cab2b4136f27fceca.tar.xz
ad_lavc: handle decoder EAGAIN only if there was an input packet
Otherwise, it'd probably get stuck if the decoder still returns EAGAIN at EOF on e.g. a shortened data stream.
-rw-r--r--audio/decode/ad_lavc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index 8837f681eb..1ff8769cd7 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -353,10 +353,10 @@ static int decode_new_packet(struct dec_audio *da)
talloc_free(mpkt);
priv->packet = NULL;
}
+ // LATM may need many packets to find mux info
+ if (ret == AVERROR(EAGAIN))
+ return 0;
}
- // LATM may need many packets to find mux info
- if (ret == AVERROR(EAGAIN))
- return 0;
if (ret < 0) {
mp_msg(MSGT_DECAUDIO, MSGL_V, "lavc_audio: error\n");
return -1;