endif
# PROGRAM_BUILD is a complete identification of the build
-# ( we can't use fancy options with date since OSes like Solaris
-# or FreeBSD have strange date implementations )
+# (we can't use fancy options with date since OSes like Solaris
+# or FreeBSD have strange date implementations)
PROGRAM_BUILD = `date` $(USER)
-# XXX: beos does not support hostname
+# XXX: beos does not support hostname (how lame...)
#PROGRAM_BUILD = `date` $(USER)@`hostname`
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_)
+# On Linux activate 64-bit off_t (by default under BSD)
+ifneq (,$(findstring linux,$(SYS)))
+DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
+endif
+
################################################################################
# Tuning and other variables - do not change anything except if you know
# exactly what you are doing
* input.h: structures of the input not exported to other modules
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input.h,v 1.27 2001/02/08 13:52:34 massiot Exp $
+ * $Id: input.h,v 1.28 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
if( p_pes != NULL )
{
- p_pes->b_messed_up = 1;
+ p_pes->b_discontinuity = 1;
p_es->p_last->p_next = p_pad_data;
p_es->p_last = p_pad_data;
}
p_pes->i_rate = p_input->stream.control.i_rate;
p_pes->p_first = p_pad_data;
- p_pes->b_messed_up = p_pes->b_discontinuity = 1;
+ p_pes->b_discontinuity = 1;
input_DecodePES( p_es->p_decoder_fifo, p_pes );
}
-
- p_es->b_discontinuity = 0;
}
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-dec.h,v 1.21 2001/02/08 13:52:34 massiot Exp $
+ * $Id: input_ext-dec.h,v 1.22 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
typedef struct pes_packet_s
{
/* PES properties */
- boolean_t b_messed_up; /* At least one of the data packets
- * has a questionable content */
boolean_t b_data_alignment; /* used to find the beginning of
* a video or audio unit */
boolean_t b_discontinuity; /* This packet doesn't follow the
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.17 2001/02/08 13:52:34 massiot Exp $
+ * $Id: input_ext-intf.h,v 1.18 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
struct pes_packet_s * p_pes; /* Current PES */
struct data_packet_s * p_last; /* The last packet gathered at present */
int i_pes_real_size; /* as indicated by the header */
- boolean_t b_discontinuity; /* Stream changed */
/* Decoder information */
struct decoder_fifo_s * p_decoder_fifo;
count_t c_average_count;
/* counter used to compute dynamic average values */
int i_synchro_state;
- boolean_t b_discontinuity;
/* Demultiplexer data */
void * p_demux_data;
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_css.c,v 1.2 2001/02/08 06:41:56 stef Exp $
+ * $Id: dvd_css.c,v 1.3 2001/02/08 17:44:12 massiot Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
-#include <malloc.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#ifdef HAVE_SYS_DVDIO_H
DVD_key_t my_key;
title_key_t title_key[MaxKeys] ;
int i_title;
- off64_t i_pos = 0;
+ off_t i_pos = 0;
int i_bytes_read;
int i_best_plen;
int i_best_p;
i_pos = p_css->p_title_key[i_title].i;
do
{
- i_pos = lseek64( i_fd, i_pos, SEEK_SET );
+ i_pos = lseek( i_fd, i_pos, SEEK_SET );
i_bytes_read = read( i_fd, pi_buf, 0x800 );
if( pi_buf[0x14] & 0x30 ) // PES_scrambling_control
{
* dvd_ifo.c: Functions for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ifo.c,v 1.2 2001/02/08 08:08:03 stef Exp $
+ * $Id: dvd_ifo.c,v 1.3 2001/02/08 17:44:12 massiot Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
-#include <malloc.h>
#include "common.h"
while( strncmp( psz_test, psz_ifo_start, 12 ) != 0 )
{
/* The start of ifo file is on a sector boundary */
- p_ifo->i_pos = lseek64( p_ifo->i_fd,
+ p_ifo->i_pos = lseek( p_ifo->i_fd,
p_ifo->i_pos + DVD_LB_SIZE,
SEEK_SET );
read( p_ifo->i_fd, psz_test, 12 );
while( strncmp( psz_test, psz_ifo_start, 12 ) != 0 )
{
/* The start of ifo file is on a sector boundary */
- p_ifo->i_pos = lseek64( p_ifo->i_fd,
+ p_ifo->i_pos = lseek( p_ifo->i_fd,
p_ifo->i_pos + DVD_LB_SIZE,
SEEK_SET );
read( p_ifo->i_fd, psz_test, 12 );
ifo.i_fd = i_fd;
/* No data at the beginning of the disk
* 512000 bytes is just another value :) */
- ifo.i_pos = lseek64( ifo.i_fd, 250 *DVD_LB_SIZE, SEEK_SET );
+ ifo.i_pos = lseek( ifo.i_fd, 250 *DVD_LB_SIZE, SEEK_SET );
/* FIXME : use udf filesystem to find the beginning of the file */
IfoFindVMG( &ifo );
#define FLUSH( i_len ) \
{ \
/*fprintf(stderr, "Pos : %lld\n", (long long)(p_ifo->i_pos - i_start));*/ \
- p_ifo->i_pos = lseek64( p_ifo->i_fd , \
+ p_ifo->i_pos = lseek( p_ifo->i_fd , \
p_ifo->i_pos + (i_len), SEEK_SET ); \
}
{
pgc_t pgc;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "PGC\n" );
/* Parsing of pgc_com_tab_t */
if( pgc.i_com_tab_sbyte )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start
+ pgc.i_com_tab_sbyte, SEEK_SET );
GETS( &pgc.com_tab.i_pre_com_nb );
GETS( &pgc.com_tab.i_post_com_nb );
/* Parsing of pgc_prg_map_t */
if( pgc.i_prg_map_sbyte )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start
+ pgc.i_prg_map_sbyte, SEEK_SET );
pgc.prg_map.pi_entry_cell = malloc( pgc.i_prg_nb *sizeof(u8) );
if( pgc.prg_map.pi_entry_cell == NULL )
/* Parsing of cell_play_inf_t */
if( pgc.i_cell_play_inf_sbyte )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start
+ pgc.i_cell_play_inf_sbyte, SEEK_SET );
pgc.p_cell_play_inf = malloc( pgc.i_cell_nb *sizeof(cell_play_inf_t) );
if( pgc.p_cell_play_inf == NULL )
/* Parsing of cell_pos_inf_map */
if( pgc.i_cell_pos_inf_sbyte )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start
+ pgc.i_cell_pos_inf_sbyte, SEEK_SET );
pgc.p_cell_pos_inf = malloc( pgc.i_cell_nb *sizeof(cell_pos_inf_t) );
if( pgc.p_cell_play_inf == NULL )
{
pgci_inf_t inf;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "Unit\n" );
}
for( i=0 ; i<inf.i_srp_nb ; i++ )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd,
+ p_ifo->i_pos = lseek( p_ifo->i_fd,
i_start + inf.p_srp[i].i_pgci_sbyte,
SEEK_SET );
inf.p_srp[i].pgc = ReadPGC( p_ifo );
{
pgci_ut_t pgci;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "Unit Table\n" );
}
for( i=0 ; i<pgci.i_lu_nb ; i++ )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start +
pgci.p_lu[i].i_lu_sbyte,
SEEK_SET );
pgci.p_pgci_inf[i] = ReadUnit( p_ifo );
{
c_adt_t c_adt;
int i, i_max;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "CELL ADD\n" );
{
vobu_admap_t map;
int i, i_max;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "VOBU ADMAP\n" );
{
vmgi_mat_t mat;
int i;
-// off64_t i_start = p_ifo->i_pos;
+// off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "VMGI\n" );
{
vmg_ptt_srpt_t ptr;
int i;
-// off64_t i_start = p_ifo->i_pos;
+// off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "PTR\n" );
{
vmg_ptl_mait_t par;
int i, j, k;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "PTL\n" );
}
for( i=0 ; i<par.i_country_nb ; i++ )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start +
par.p_ptl_desc[i].i_ptl_mai_sbyte, SEEK_SET );
for( j=1 ; j<=8 ; j++ )
{
{
vmg_vts_atrt_t atrt;
int i, j;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "VTS ATTR\n" );
}
for( i=0 ; i<atrt.i_vts_nb ; i++ )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start +
atrt.pi_vts_atrt_sbyte[i],
SEEK_SET );
GETL( &atrt.p_vts_atrt[i].i_ebyte );
{
vmg_t vmg;
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off, SEEK_SET);
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off, SEEK_SET);
vmg.mat = ReadVMGInfMat( p_ifo );
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_fp_pgc_sbyte, SEEK_SET );
vmg.pgc = ReadPGC( p_ifo );
if( vmg.mat.i_ptt_srpt_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_ptt_srpt_ssector *DVD_LB_SIZE,
SEEK_SET );
vmg.ptt_srpt = ReadVMGTitlePointer( p_ifo );
}
if( vmg.mat.i_pgci_ut_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_pgci_ut_ssector *DVD_LB_SIZE,
SEEK_SET );
vmg.pgci_ut = ReadUnitTable( p_ifo );
}
if( vmg.mat.i_ptl_mait_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_ptl_mait_ssector *DVD_LB_SIZE,
SEEK_SET );
vmg.ptl_mait = ReadParentalInf( p_ifo );
}
if( vmg.mat.i_vts_atrt_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_vts_atrt_ssector *DVD_LB_SIZE,
SEEK_SET );
vmg.vts_atrt = ReadVTSAttr( p_ifo );
}
if( vmg.mat.i_c_adt_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_c_adt_ssector *DVD_LB_SIZE,
SEEK_SET );
vmg.c_adt = ReadCellInf( p_ifo );
}
if( vmg.mat.i_vobu_admap_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vmg.mat.i_vobu_admap_ssector *DVD_LB_SIZE,
SEEK_SET );
vmg.vobu_admap = ReadMap( p_ifo );
{
vtsi_mat_t mat;
int i;
-// off64_t i_start = p_ifo->i_pos;
+// off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "VTSI\n" );
{
vts_ptt_srpt_t ptr;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "PTR\n" );
}
for( i=0 ; i<ptr.i_ttu_nb ; i++ )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_start +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_start +
ptr.pi_ttu_sbyte[i], SEEK_SET );
GETS( &ptr.p_ttu[i].i_pgc_nb );
GETS( &ptr.p_ttu[i].i_prg_nb );
{
vts_tmap_ti_t tmap;
int i,j;
-// off64_t i_start = p_ifo->i_pos;
+// off_t i_start = p_ifo->i_pos;
//fprintf( stderr, "TMAP\n" );
vts.mat = ReadVTSInfMat( p_ifo );
if( vts.mat.i_ptt_srpt_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_ptt_srpt_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.ptt_srpt = ReadVTSTitlePointer( p_ifo );
}
if( vts.mat.i_m_pgci_ut_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_m_pgci_ut_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.pgci_ut = ReadUnitTable( p_ifo );
}
if( vts.mat.i_pgcit_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_pgcit_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.pgci_ti = ReadUnit( p_ifo );
}
if( vts.mat.i_tmap_ti_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_tmap_ti_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.tmap_ti = ReadVTSTimeMap( p_ifo );
}
if( vts.mat.i_m_c_adt_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_m_c_adt_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.m_c_adt = ReadCellInf( p_ifo );
}
if( vts.mat.i_m_vobu_admap_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_m_vobu_admap_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.m_vobu_admap = ReadMap( p_ifo );
}
if( vts.mat.i_c_adt_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_c_adt_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.c_adt = ReadCellInf( p_ifo );
}
if( vts.mat.i_vobu_admap_ssector )
{
- p_ifo->i_pos = lseek64( p_ifo->i_fd, p_ifo->i_off +
+ p_ifo->i_pos = lseek( p_ifo->i_fd, p_ifo->i_off +
vts.mat.i_vobu_admap_ssector *DVD_LB_SIZE,
SEEK_SET );
vts.vobu_admap = ReadMap( p_ifo );
void IfoRead( ifo_t* p_ifo )
{
int i;
- off64_t i_off;
+ off_t i_off;
p_ifo->vmg = ReadVMG( p_ifo );
p_ifo->p_vts = malloc( p_ifo->vmg.mat.i_tts_nb *sizeof(vts_t) );
intf_WarnMsg( 3, "######### VTS %d #############\n", i+1 );
i_off = p_ifo->vmg.ptt_srpt.p_tts[i].i_ssector *DVD_LB_SIZE;
- p_ifo->i_pos = lseek64( p_ifo->i_fd, i_off, SEEK_SET );
+ p_ifo->i_pos = lseek( p_ifo->i_fd, i_off, SEEK_SET );
/* FIXME : use udf filesystem to avoid this */
IfoFindVTS( p_ifo );
p_ifo->p_vts[i] = ReadVTS( p_ifo );
* dvd_ifo.h: Structures for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ifo.h,v 1.1 2001/02/08 04:43:27 sam Exp $
+ * $Id: dvd_ifo.h,v 1.2 2001/02/08 17:44:12 massiot Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
/* File descriptor for the device */
int i_fd;
/* Offset to video_ts.ifo on the device */
- off64_t i_off;
+ off_t i_off;
/* Position of stream pointer */
- off64_t i_pos;
+ off_t i_pos;
/* Error Management */
boolean_t b_error;
/* Structure described in video_ts */
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.4 2001/02/08 11:22:41 massiot Exp $
+ * $Id: input_dvd.c,v 1.5 2001/02/08 17:44:12 massiot Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
static void DVDOpen ( struct input_thread_s * );
static void DVDClose ( struct input_thread_s * );
static void DVDEnd ( struct input_thread_s * );
-/* FIXME : DVDSeek should be on 64 bits ? Is it possible in input ? */
-static int DVDSeek ( struct input_thread_s *, off_t );
+static void DVDSeek ( struct input_thread_s *, off_t );
static int DVDRewind ( struct input_thread_s * );
/*****************************************************************************
static void DVDInit( input_thread_t * p_input )
{
thread_dvd_data_t * p_method;
- off64_t i_start;
+ off_t i_start;
if( (p_method = malloc( sizeof(thread_dvd_data_t) )) == NULL )
{
p_method->i_title = 0;
- lseek64( p_input->i_handle, 0, SEEK_SET );
+ lseek( p_input->i_handle, 0, SEEK_SET );
/* Reading structures initialisation */
input_NetlistInit( p_input, 4096, 4096, DVD_LB_SIZE,
i_start = p_method->ifo.p_vts[0].i_pos +
p_method->ifo.p_vts[0].mat.i_tt_vobs_ssector *DVD_LB_SIZE;
- i_start = lseek64( p_input->i_handle, i_start, SEEK_SET );
+ i_start = lseek( p_input->i_handle, i_start, SEEK_SET );
intf_Msg( "VOB start at : %lld", (long long)i_start );
/* Initialize ES structures */
break;
}
}
- lseek64( p_input->i_handle, i_start, SEEK_SET );
+ lseek( p_input->i_handle, i_start, SEEK_SET );
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.i_tell = 0;
if( p_demux_data->b_has_PSM )
{
intf_Msg( "input: opening DVD %s", p_input->p_source );
- p_input->i_handle = open( p_input->p_source,
- O_RDONLY | O_NONBLOCK | O_LARGEFILE );
+ p_input->i_handle = open( p_input->p_source, O_RDONLY | O_NONBLOCK );
if( p_input->i_handle == -1 )
{
* input and translate chronological position from input to logical postion
* on the device
*****************************************************************************/
-static int DVDSeek( input_thread_t * p_input, off_t i_off )
+static void DVDSeek( input_thread_t * p_input, off_t i_off )
{
- return( -1 );
+ return;
}
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.3 2001/02/08 13:52:35 massiot Exp $
+ * $Id: input_ps.c,v 1.4 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->b_error = 1;
return;
}
- fseek( p_method->stream, 0, SEEK_SET );
+ rewind( p_method->stream );
/* FIXME : detect if InitStream failed */
input_InitStream( p_input, sizeof( stream_ps_data_t ) );
break;
}
}
- fseek( p_method->stream, 0, SEEK_SET );
+ rewind( p_method->stream );
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.i_tell = 0;
if( p_demux_data->b_has_PSM )
p_method = (thread_ps_data_t *)p_input->p_plugin_data;
/* A little bourrin but should work for a while --Meuuh */
- fseek( p_method->stream, i_position, SEEK_SET );
+ fseeko( p_method->stream, i_position, SEEK_SET );
p_input->stream.i_tell = i_position;
}
return NULL;
}
- p_pes->b_messed_up = p_pes->b_data_alignment = p_pes->b_discontinuity =
+ p_pes->b_data_alignment = p_pes->b_discontinuity =
p_pes->i_pts = p_pes->i_dts = 0;
p_pes->i_pes_size = 0;
p_pes->p_first = NULL;
*****************************************************************************/
void input_Seek( input_thread_t * p_input, off_t i_position )
{
- intf_Msg( "input: seeking position %d/%d", i_position,
- p_input->stream.i_size );
+ intf_Msg( "input: seeking position %lld/%lld", i_position,
+ p_input->stream.i_size );
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.i_seek = i_position;
vlc_cond_signal( &p_input->stream.stream_wait );
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.29 2001/02/08 01:34:42 stef Exp $
+ * $Id: input_netlist.c,v 1.30 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
vlc_mutex_unlock (&p_netlist->lock);
/* initialize PES */
- p_return->b_messed_up =
- p_return->b_data_alignment =
+ p_return->b_data_alignment =
p_return->b_discontinuity =
p_return->i_pts = p_return->i_dts = 0;
p_return->i_pes_size = 0;
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.30 2001/02/08 13:52:35 massiot Exp $
+ * $Id: input_programs.c,v 1.31 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->stream.pp_programs[i_pgrm_index]->i_synchro_state
= SYNCHRO_START;
- p_input->stream.pp_programs[i_pgrm_index]->b_discontinuity = 0;
p_input->stream.pp_programs[i_pgrm_index]->p_vout
= p_input->p_default_vout;
/* Init its values */
p_es->i_id = i_es_id;
- p_es->b_discontinuity = 0;
p_es->p_pes = NULL;
p_es->p_decoder_fifo = NULL;
p_es->b_audio = 0;
#define S p_input->stream
intf_Msg( "input info: Dumping stream ID 0x%x", S.i_stream_id );
if( S.b_seekable )
- intf_Msg( "input info: seekable stream, position: %d/%d",
+ intf_Msg( "input info: seekable stream, position: %lld/%lld",
S.i_tell, S.i_size );
else
intf_Msg( "input info: %s", S.b_pace_control ? "pace controlled" :
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.33 2001/02/08 13:52:35 massiot Exp $
+ * $Id: mpeg_system.c,v 1.34 2001/02/08 17:44:12 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
/* PES_packet_length is set and != total received payload */
/* Warn the decoder that the data may be corrupt. */
intf_WarnMsg( 3, "PES sizes do not match : packet corrupted" );
- p_pes->b_messed_up = 1;
}
switch( p_es->i_stream_id )
/* If we lost data, insert a NULL data packet (philosophy : 0 is quite
* often an escape sequence in decoders, so that should make them wait
* for the next start code). */
- if( b_packet_lost || p_es->b_discontinuity )
+ if( b_packet_lost )
{
input_NullPacket( p_input, p_es );
}
/* If the PID carries the PCR, there will be a system
* time-based discontinuity. We let the PCR decoder
* handle that. */
- p_es->p_pgrm->b_discontinuity = 1;
+ p_es->p_pgrm->i_synchro_state = SYNCHRO_REINIT;
/* There also may be a continuity_counter
* discontinuity: resynchronise our counter with
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.71 2001/02/07 15:32:26 massiot Exp $
+ * $Id: video_parser.c,v 1.72 2001/02/08 17:44:13 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
DECODER_FIFO_START( *p_bit_stream->p_decoder_fifo )->i_dts;
p_vpar->sequence.i_current_rate =
DECODER_FIFO_START( *p_bit_stream->p_decoder_fifo )->i_rate;
+
+ if( DECODER_FIFO_START( *p_bit_stream->p_decoder_fifo )->b_discontinuity )
+ {
+ /* Escape the current picture and reset the picture predictors. */
+ p_vpar->picture.b_error = 1;
+ if( p_vpar->sequence.p_forward != NULL )
+ {
+ vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
+ }
+ if( p_vpar->sequence.p_backward != NULL )
+ {
+ vout_DatePicture( p_vpar->p_vout, p_vpar->sequence.p_backward,
+ vpar_SynchroDate( p_vpar ) );
+ vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_backward );
+ }
+ p_vpar->sequence.p_forward = p_vpar->sequence.p_backward = NULL;
+ }
+ }
+
+ if( p_bit_stream->p_data->b_discard_payload )
+ {
+ /* 1 packet messed up, trash the slice. */
+ p_vpar->picture.b_error = 1;
}
}