mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
e9f49ea84d
commit
2bcfb49a39
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue