diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index 985fd58084..e323a6cbda 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -254,7 +254,11 @@ static bool receive_frame(struct mp_filter *da, struct mp_frame *out) priv->trim_samples -= trim; } - *out = MAKE_FRAME(MP_FRAME_AUDIO, mpframe); + if (mp_aframe_get_size(mpframe) > 0) { + *out = MAKE_FRAME(MP_FRAME_AUDIO, mpframe); + } else { + talloc_free(mpframe); + } av_frame_unref(priv->avframe);