diff options
author | wm4 <wm4@nowhere> | 2017-01-24 08:04:53 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-24 08:04:53 +0100 |
commit | 6be58df8d14922bc1f4252f9f69ca9c0d74c331a (patch) | |
tree | dd8a663dfefbe0e290cfcaac8099a60c05249c3b /audio/decode | |
parent | 00eadcec8d59c3868bade4b3013b05127e75d5a2 (diff) | |
download | mpv-6be58df8d14922bc1f4252f9f69ca9c0d74c331a.tar.bz2 mpv-6be58df8d14922bc1f4252f9f69ca9c0d74c331a.tar.xz |
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.
Diffstat (limited to 'audio/decode')
-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; |