[vlc-commits] [Git][videolan/vlc][master] aout: rework reset before aout->stop

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Jun 22 14:38:50 UTC 2024



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
ef75cfe7 by Thomas Guillem at 2024-06-22T14:25:55+00:00
aout: rework reset before aout->stop

An asynchronous timing report would fail/assert after a stream_Reset().

This issue was hidden since, most of the time, vlc_aout_stream_Flush()
is called before vlc_aout_stream_Delete() but there are some rare case
where vlc_aout_stream_Delete() is called without a flush.

- - - - -


2 changed files:

- src/audio_output/dec.c
- src/audio_output/filters.c


Changes:

=====================================
src/audio_output/dec.c
=====================================
@@ -331,11 +331,14 @@ void vlc_aout_stream_Delete (vlc_aout_stream *stream)
 
     if (stream->mixer_format.i_format)
     {
-        stream_Reset(stream);
         vlc_audio_meter_Reset(&owner->meter, NULL);
         if (stream->filters)
             aout_FiltersDelete (aout, stream->filters);
         aout_OutputDelete (aout);
+
+        vlc_clock_Lock(stream->sync.clock);
+        vlc_clock_Reset(stream->sync.clock);
+        vlc_clock_Unlock(stream->sync.clock);
     }
     if (stream->volume != NULL)
         aout_volume_Delete(stream->volume);


=====================================
src/audio_output/filters.c
=====================================
@@ -144,7 +144,12 @@ static void aout_FiltersPipelineDestroy(struct aout_filter *tab, unsigned n)
         if (tab[i].vout != NULL)
             vout_Close(tab[i].vout);
         if (tab[i].clock != NULL)
+        {
+            vlc_clock_Lock(tab[i].clock);
+            vlc_clock_Reset(tab[i].clock);
+            vlc_clock_Unlock(tab[i].clock);
             vlc_clock_Delete(tab[i].clock);
+        }
     }
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ef75cfe77765de7ac401729f7dd79e746a1a8d78

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ef75cfe77765de7ac401729f7dd79e746a1a8d78
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