mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
ao_sun: Add support for AOPLAY_FINAL_CHUNK
Reportedly this also fixes a possible hang at the end of playback (shouldn't happen unless delay reporting is broken too). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32509 b3059339-0415-0410-9bf9-f77b7e298cf2 Reindent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32510 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
56d122a6db
commit
c640b92bdd
@ -664,9 +664,11 @@ static int get_space(void){
|
|||||||
// it should round it down to outburst*n
|
// it should round it down to outburst*n
|
||||||
// return: number of bytes played
|
// return: number of bytes played
|
||||||
static int play(void* data,int len,int flags){
|
static int play(void* data,int len,int flags){
|
||||||
if (len < ao_data.outburst) return 0;
|
if (!(flags & AOPLAY_FINAL_CHUNK)) {
|
||||||
len /= ao_data.outburst;
|
len /= ao_data.outburst;
|
||||||
len *= ao_data.outburst;
|
len *= ao_data.outburst;
|
||||||
|
}
|
||||||
|
if (len <= 0) return 0;
|
||||||
|
|
||||||
len = write(audio_fd, data, len);
|
len = write(audio_fd, data, len);
|
||||||
if(len > 0) {
|
if(len > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user