0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

f_async_queue: don't count EOF frames as samples

That's dumb.
This commit is contained in:
wm4 2020-08-28 20:07:12 +02:00
parent 86068af178
commit 71d118733a
2 changed files with 4 additions and 1 deletions

View File

@ -88,6 +88,8 @@ static int64_t frame_get_samples(struct async_queue *q, struct mp_frame frame)
struct mp_aframe *aframe = frame.data;
res = mp_aframe_get_size(aframe);
}
if (mp_frame_is_signaling(frame))
return 0;
return res;
}

View File

@ -65,7 +65,8 @@ struct mp_filter *mp_async_queue_create_filter(struct mp_filter *parent,
enum mp_async_queue_sample_unit {
AQUEUE_UNIT_FRAME = 0, // a frame counts as 1 sample
AQUEUE_UNIT_SAMPLES, // number of audio samples (1 for other media types)
AQUEUE_UNIT_SAMPLES, // number of audio samples (1 for other media types,
// 0 for signaling)
};
// Setting this struct to all-0 is equivalent to defaults.