[FFmpeg-devel] [PATCH 2/5] avdevice/alsa_dec: make sure we have enough data in non-blocking mode
Marton Balint
cus at passwd.hu
Sun Feb 28 15:42:54 EET 2021
On Sun, 28 Feb 2021, Nicolas George wrote:
> Marton Balint (12021-02-21):
>> Otherwise we might return 1-2 samples per packet if av_read_frame() call rate is
>> only sligthly less than the stream sample rate.
>>
>> Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>> libavdevice/alsa_dec.c | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>
> Looping snd_pcm_readi() seems like a more robust solution to this issue.
Robust how? For non-blocking mode that would mean you have to keep the
read data in the context if you read less than period size. Doable, but
I wanted to avoid it.
Regards,
Marton
More information about the ffmpeg-devel
mailing list