Commit bf73ff64 authored by Gildas Bazin's avatar Gildas Bazin

* src/input/input_clock.c: fixed 2 regressions in 0.6.1. These fixes are actually there to make us more complacent with broken streams.
* 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)
parent 4cd852f3
......@@ -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 ""
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment