mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 14:50:07 +00:00
ad_lavc: respect AV_FRAME_FLAG_DISCARD
Since we set "skip_manual", we can actually get frames with this set. Currently, only AV_PKT_FLAG_DISCARD will trigger this flag, and only mov.c sets the latter flags, so this is related to FFmpeg's half-broken mp4 edit list support.
This commit is contained in:
parent
00eadcec8d
commit
6be58df8d1
@ -221,6 +221,11 @@ static bool receive_frame(struct dec_audio *da, struct mp_audio **out)
|
||||
MP_ERR(da, "Error decoding audio.\n");
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_MICRO >= 100
|
||||
if (priv->avframe->flags & AV_FRAME_FLAG_DISCARD)
|
||||
av_frame_unref(priv->avframe);
|
||||
#endif
|
||||
|
||||
if (!priv->avframe->buf[0])
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user