mirror of
https://github.com/mpv-player/mpv
synced 2025-01-25 00:53:22 +00:00
f_async_queue: don't count EOF frames as samples
That's dumb.
This commit is contained in:
parent
86068af178
commit
71d118733a
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user