[vlc-commits] pulse: timing info can be NULL, deal with it

Rémi Denis-Courmont git at videolan.org
Sun Aug 23 19:07:25 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 23 20:02:58 2015 +0300| [3e3504bf67afc59f804d76330ea84b04a8cb0190] | committer: Rémi Denis-Courmont

pulse: timing info can be NULL, deal with it

(cherry picked from commit c00c298601174cbe271fbc16e34b9f77b584fb63)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=3e3504bf67afc59f804d76330ea84b04a8cb0190
---

 modules/audio_output/vlcpulse.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/audio_output/vlcpulse.c b/modules/audio_output/vlcpulse.c
index 0952cb0..42aea5c 100644
--- a/modules/audio_output/vlcpulse.c
+++ b/modules/audio_output/vlcpulse.c
@@ -264,6 +264,11 @@ mtime_t vlc_pa_get_latency(vlc_object_t *obj, pa_context *ctx, pa_stream *s)
     const pa_sample_spec *ss = pa_stream_get_sample_spec(s);
     const pa_timing_info *ti = pa_stream_get_timing_info(s);
 
+    if (ti == NULL) {
+        msg_Dbg(obj, "no timing infos");
+        return VLC_TS_INVALID;
+    }
+
     if (ti->write_index_corrupt) {
         msg_Dbg(obj, "write index corrupt");
         return VLC_TS_INVALID;



More information about the vlc-commits mailing list