1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 01:47:38 +00:00

ad_lavc: skip fully skipped frames

Fixes stupid messages with a opus/mkv test file that had an absurdly
huge codec delay.

This file fully skips several frames at the start. ad_lavc.c trimmed
these frames to 0 samples and returned them. The next layer
(f_decoder_wrapper.c) saw discontinuous PTS values, because the PTS
values increased by a frame, but amounted to 0 audio samples. This was
harmless, but logged PTS discontinuity errors.
This commit is contained in:
wm4 2019-05-22 21:45:54 +02:00
parent 1af97e7c15
commit f93826afa5

View File

@ -254,7 +254,8 @@ 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);
av_frame_unref(priv->avframe);