]> git.sesse.net Git - vlc/commitdiff
* src/input/input_clock.c: fixed 2 regressions in 0.6.1. These fixes are actually...
authorGildas Bazin <gbazin@videolan.org>
Fri, 1 Aug 2003 00:05:07 +0000 (00:05 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 1 Aug 2003 00:05:07 +0000 (00:05 +0000)
* modules/access/dvb/qpsk.c: gettext reserves the use of _("").
* modules/demux/mkv.cpp, modules/demux/avi/libavi.c, modules/demux/mp4/libmp4.c, modules/demux/mpeg/m4v.c: checks for input_SplitBuffer() > 0. (Thanks to Steve Li for pointing this out)

modules/access/dvb/qpsk.c
modules/demux/avi/libavi.c
modules/demux/mkv.cpp
modules/demux/mp4/libmp4.c
modules/demux/mpeg/m4v.c
src/input/input_clock.c

index 96afef14591edb31a214e4842ef134c79ffa3e3d..f171e85f406251d23d9bb87b9ce79deaec413ca3 100644 (file)
@@ -41,10 +41,10 @@ void E_(Close)   ( vlc_object_t * );
  *****************************************************************************/
 
 #define ADAPTER_TEXT N_("adapter card to tune")
-#define ADAPTER_LONGTEXT N_("")
+#define ADAPTER_LONGTEXT ""
 
 #define DEVICE_TEXT N_("device nummer to use on adapter")
-#define DEVICE_LONGTEXT N_("")
+#define DEVICE_LONGTEXT ""
 
 #define FREQ_TEXT N_("satellite default transponder frequency")
 #define FREQ_LONGTEXT ""
index da927c3a02b3c6cbabc21685cbb845ed81c711e9..8d4392961a5f13c432fc04ee6d38ddf85f6a1890 100644 (file)
@@ -2,7 +2,7 @@
  * libavi.c :
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: libavi.c,v 1.20 2003/05/03 01:12:13 fenrir Exp $
+ * $Id: libavi.c,v 1.21 2003/08/01 00:05:07 gbazin Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -129,17 +129,14 @@ int AVI_SeekAbsolute( input_thread_t *p_input,
 
             i_read = input_SplitBuffer( p_input, &p_data, 
                                         __MIN( 4096, i_skip ) );
-            if( i_read < 0 )
+            if( i_read <= 0 )
             {
+                /* Error or eof */
                 return VLC_EGENERIC;
             }
             i_skip -= i_read;
 
             input_DeletePacket( p_input->p_method_data, p_data );
-            if( i_read == 0 && i_skip > 0 )
-            {
-                return VLC_EGENERIC;
-            }
         }
         return VLC_SUCCESS;
     }
index 93fc53627a73dc323aa09a955423c5116ca37022..8d79b005601f1b7a251fd0260828c67572f3aef0 100644 (file)
@@ -2,7 +2,7 @@
  * mkv.cpp : matroska demuxer
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: mkv.cpp,v 1.17 2003/07/04 16:35:20 sam Exp $
+ * $Id: mkv.cpp,v 1.18 2003/08/01 00:05:07 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -1973,7 +1973,7 @@ void vlc_stream_io_callback::setFilePointer(int64_t i_offset, seek_mode mode )
 
             i_read = input_SplitBuffer( p_input, &p_data,
                                         __MIN( 4096, i_skip ) );
-            if( i_read < 0 )
+            if( i_read <= 0 )
             {
                 msg_Err( p_input, "seek failed" );
                 mb_eof = VLC_TRUE;
index 11488a952fec3acc54748d57b2985682b88ad8ab..2e4483e9f241be7a7575d9b15e3413869cefb9c5 100644 (file)
@@ -2,7 +2,7 @@
  * libmp4.c : LibMP4 library for mp4 module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: libmp4.c,v 1.28 2003/07/19 15:12:10 fenrir Exp $
+ * $Id: libmp4.c,v 1.29 2003/08/01 00:05:07 gbazin Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -273,7 +273,7 @@ int MP4_SeekAbsolute( input_thread_t *p_input,
 
             i_read = input_SplitBuffer( p_input, &p_data, 
                                         __MIN( 4096, i_skip ) );
-            if( i_read < 0 )
+            if( i_read <= 0 )
             {
                 msg_Warn( p_input, "seek:cannot read" );
                 return VLC_EGENERIC;
index 5edf1a4b69eca08423924344ff668351fa66b519..007db52a240fd10a7800b90dd88ecc1c6d46b6e4 100644 (file)
@@ -2,7 +2,7 @@
  * m4v.c : MPEG-4 video Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: m4v.c,v 1.5 2003/05/05 22:23:36 gbazin Exp $
+ * $Id: m4v.c,v 1.6 2003/08/01 00:05:07 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -230,7 +230,7 @@ static int Demux( input_thread_t * p_input )
 
         if( ( i_read = input_SplitBuffer( p_input,
                                           &p_data,
-                                          i_size ) ) < 0 )
+                                          i_size ) ) <= 0 )
         {
             msg_Warn( p_input, "error while reading data" );
             break;
@@ -262,7 +262,7 @@ static int Demux( input_thread_t * p_input )
 
         if( ( i_read = input_SplitBuffer( p_input,
                                           &p_data,
-                                          i_size ) ) < 0 )
+                                          i_size ) ) <= 0 )
         {
             msg_Warn( p_input, "error while reading data" );
             break;
index 8aab14014b2947705ed7221baaceb2bd4f8105d6..97add19939371daed9f1b1e8da7156f45b4c685b 100644 (file)
@@ -2,7 +2,7 @@
  * input_clock.c: Clock/System date convertions, stream management
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_clock.c,v 1.39 2003/07/28 13:19:37 massiot Exp $
+ * $Id: input_clock.c,v 1.40 2003/08/01 00:05:07 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -75,7 +75,7 @@ static void ClockNewRef( pgrm_descriptor_t * p_pgrm,
 #define CR_MAX_AVERAGE_COUNTER 40
 
 /* Maximum gap allowed between two CRs. */
-#define CR_MAX_GAP 1000000
+#define CR_MAX_GAP 2000000
 
 /* Latency introduced on DVDs with CR == 0 on chapter change - this is from
  * my dice --Meuuh */
@@ -239,6 +239,7 @@ void input_ClockManageRef( input_thread_t * p_input,
     {
         /* Feed synchro with a new reference point. */
         ClockNewRef( p_pgrm, i_clock,
+                     i_clock == 0 ? mdate() :
                      p_pgrm->last_pts + CR_MEAN_PTS_GAP > mdate() ?
                      p_pgrm->last_pts + CR_MEAN_PTS_GAP : mdate() );
         p_pgrm->i_synchro_state = SYNCHRO_OK;