diff options
-rw-r--r-- | audio/decode/ad_lavc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index 073d363122..759f4879f0 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -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; |