[vlc-commits] aout: use INT64_MIN as invalid delay value

Rémi Denis-Courmont git at videolan.org
Sun May 20 22:51:33 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 20 23:50:27 2012 +0300| [ff5e88129e7b2657ef093a66dcf9c677d9166e02] | committer: Rémi Denis-Courmont

aout: use INT64_MIN as invalid delay value

Delay can be zero, VLC_TS_INVALID is a valid delay.

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

 modules/audio_output/packet.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/packet.c b/modules/audio_output/packet.c
index 17693e0..b1d4dc1 100644
--- a/modules/audio_output/packet.c
+++ b/modules/audio_output/packet.c
@@ -21,6 +21,7 @@
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
+#include <limits.h>
 #include <assert.h>
 #include <vlc_common.h>
 #include <vlc_aout.h>
@@ -141,7 +142,7 @@ void aout_PacketInit (audio_output_t *aout, aout_packet_t *p, unsigned samples)
     aout_FifoInit (&p->partial, aout->format.i_rate);
     aout_FifoInit (&p->fifo, aout->format.i_rate);
     p->pause_date = VLC_TS_INVALID;
-    p->time_report = VLC_TS_INVALID;
+    p->time_report = INT64_MIN;
     p->samples = samples;
     p->starving = true;
 }
@@ -168,10 +169,10 @@ void aout_PacketPlay (audio_output_t *aout, block_t *block)
         aout_FifoPush (&p->fifo, block);
 
     time_report = p->time_report;
-    p->time_report = VLC_TS_INVALID;
+    p->time_report = INT64_MIN;
     vlc_mutex_unlock (&p->lock);
 
-    if (time_report != VLC_TS_INVALID)
+    if (time_report != INT64_MIN)
         aout_TimeReport (aout, mdate () - time_report);
 }
 



More information about the vlc-commits mailing list