]> git.sesse.net Git - ffmpeg/commit
avdevice/pulse_audio_dec: do not read undersized frames
authorMarton Balint <cus@passwd.hu>
Sat, 6 Feb 2021 18:48:51 +0000 (19:48 +0100)
committerMarton Balint <cus@passwd.hu>
Fri, 12 Mar 2021 22:55:30 +0000 (23:55 +0100)
commitb2d0826513c5e76f9bad2f1f0c809bc5c8e58b0c
tree1ac0aea9a27370f232f989949dd3f41eb62c4482
parent7f059a250bb7bcbf7bba537c1a059a5934413035
avdevice/pulse_audio_dec: do not read undersized frames

Keep on reading fragments until we got fragment_size amount of data, otherwise
we might get frames with 1-2 samples only if pa_stream_peek is called slightly
less frequently than sample rate.

Note that fragments might contain a lot less data than fragment_size, so
reading multiple fragments to get fragment_size amount of data is intentional.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/pulse_audio_dec.c