[vlc-commits] [Git][videolan/vlc][master] 2 commits: coreaudio: change drop/paused handling

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Dec 18 15:50:20 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
bc8627ed by Thomas Guillem at 2022-12-18T14:57:10+00:00
coreaudio: change drop/paused handling

Don't set *is_silence to true in case of underrun, if some data was
written.

- - - - -
871ad624 by Thomas Guillem at 2022-12-18T14:57:10+00:00
coreaudio: add back underrun handling

Regression from 370f785ef65c65ec5c11968af8168ae60466dd98

This is only used as debug purpose.

- - - - -


1 changed file:

- modules/audio_output/coreaudio_common.c


Changes:

=====================================
modules/audio_output/coreaudio_common.c
=====================================
@@ -165,9 +165,14 @@ ca_Render(audio_output_t *p_aout, uint64_t host_time,
 
     lock_lock(p_sys);
 
-
     if (p_sys->b_paused)
-        goto drop;
+    {
+        if (is_silence != NULL)
+            *is_silence = true;
+        memset(data, 0, bytes);
+        lock_unlock(p_sys);
+        return;
+    }
 
     if (!p_sys->started)
     {
@@ -206,7 +211,12 @@ ca_Render(audio_output_t *p_aout, uint64_t host_time,
     {
         vlc_frame_t *f = p_sys->p_out_chain;
         if (f == NULL)
-            goto drop;
+        {
+            p_sys->i_underrun_size += bytes;
+            memset(data, 0, bytes);
+            lock_unlock(p_sys);
+            return;
+        }
 
         size_t tocopy = f->i_buffer > bytes ? bytes : f->i_buffer;
 
@@ -244,14 +254,6 @@ ca_Render(audio_output_t *p_aout, uint64_t host_time,
     }
 
     lock_unlock(p_sys);
-
-    return;
-
-drop:
-    memset(data, 0, bytes);
-    if (is_silence != NULL)
-        *is_silence = true;
-    lock_unlock(p_sys);
 }
 
 void



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dec5d4b686c552ad5a6be53b930d5f607fb9409b...871ad624acd003446d53d1723996f24181cd521e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dec5d4b686c552ad5a6be53b930d5f607fb9409b...871ad624acd003446d53d1723996f24181cd521e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list