Commit 7cfe1ea9 authored by Stéphane Borel's avatar Stéphane Borel

-Added a SYNCHRO_START in DVDRead for each cell change to fix

multi-angle streams

-Changed seek function to prevent jump-at-will and to remove two bugs in
sector computing.

-Initialize some values in netlist (payload_discard wasn't which caused
frame dropping)

-Come back of multi-sector read which should make reading faster

Now, theyre should be very few reading error, and we have got back the
performance we had before my netlist polioting :p
parent 4f551c2b
......@@ -7,7 +7,7 @@
* will only be given back to netlist when refcount is zero.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: dvd_netlist.c,v 1.2 2001/03/03 07:07:01 stef Exp $
* $Id: dvd_netlist.c,v 1.3 2001/03/22 01:23:03 stef Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
* Stphane Borel <stef@videolan.org>
......@@ -241,10 +241,19 @@ struct iovec * DVDGetiovec( void * p_method_data )
(p_netlist->i_iovec_end - p_netlist->i_iovec_start)
& p_netlist->i_nb_iovec ) < p_netlist->i_read_once )
{
intf_ErrMsg("Empty iovec FIFO. Unable to allocate memory");
intf_ErrMsg("Empty iovec FIFO (%d:%d). Unable to allocate memory",
p_netlist->i_iovec_start, p_netlist->i_iovec_end );
return (NULL);
}
if( (
(p_netlist->i_data_end - p_netlist->i_data_start)
& p_netlist->i_nb_data ) < p_netlist->i_read_once )
{
intf_ErrMsg("Empty data FIFO (%d:%d). Unable to allocate memory",
p_netlist->i_data_start, p_netlist->i_data_end );
return (NULL);
}
/* readv only takes contiguous buffers
* so, as a solution, we chose to have a FIFO a bit longer
* than i_nb_data, and copy the begining of the FIFO to its end
......@@ -291,6 +300,7 @@ void DVDMviovec( void * p_method_data, int i_nb_iovec,
pp_data[i_loop]->pi_refcount = p_netlist->pi_refcount +
p_netlist->i_iovec_start;
p_netlist->i_iovec_start ++;
p_netlist->i_iovec_start &= p_netlist->i_nb_iovec;
......@@ -317,15 +327,6 @@ struct data_packet_s * DVDNewPtr( void * p_method_data )
/* cast */
p_netlist = (dvd_netlist_t *)p_method_data;
#ifdef DEBUG
if( i_buffer_size > p_netlist->i_buffer_size )
{
/* This should not happen */
intf_ErrMsg( "Netlist packet too small !" );
return NULL;
}
#endif
/* lock */
vlc_mutex_lock ( &p_netlist->lock );
......@@ -473,10 +474,6 @@ void DVDDeletePacket( void * p_method_data, data_packet_t * p_data )
p_data->p_buffer;
}
/* re initialize for next time */
p_data->p_next = NULL;
p_data->b_discard_payload = 0;
/* unlock */
vlc_mutex_unlock (&p_netlist->lock);
}
......@@ -505,7 +502,7 @@ void DVDDeletePES( void * p_method_data, pes_packet_t * p_pes )
p_netlist->i_data_end ++;
p_netlist->i_data_end &= p_netlist->i_nb_data;
/* re initialize*/
/* re initialize */
p_current_packet->p_payload_start = p_current_packet->p_buffer;
p_netlist->pp_free_data[p_netlist->i_data_end] = p_current_packet;
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.c,v 1.77 2001/03/02 13:20:29 massiot Exp $
* $Id: video_parser.c,v 1.78 2001/03/22 01:23:03 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -543,6 +543,7 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
if( DECODER_FIFO_START( *p_bit_stream->p_decoder_fifo )->b_discontinuity )
{
intf_WarnMsg( 1, "Discontinuity in BitstreamCallback" );
/* Escape the current picture and reset the picture predictors. */
p_vpar->sequence.b_expect_discontinuity = 1;
p_vpar->picture.b_error = 1;
......@@ -551,6 +552,7 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
if( p_bit_stream->p_data->b_discard_payload )
{
intf_WarnMsg( 1, "Discard payload in BitstreamCallback" );
/* 1 packet messed up, trash the slice. */
p_vpar->picture.b_error = 1;
}
......
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