Commit a408beac authored by Laurent Aimar's avatar Laurent Aimar

Fixed invalid/useless usage of ES_OUT_RESET_PCR.

parent 42693233
......@@ -71,9 +71,8 @@ enum es_out_query_e
/* PCR handling, DTS/PTS will be automatically computed using thoses PCR
* XXX: SET_PCR(_GROUP) are in charge of the pace control. They will wait
* to slow down the demuxer so that it reads at the right speed.
* XXX: if you want PREROLL just call RESET_PCR and
* ES_OUT_SET_NEXT_DISPLAY_TIME and send data to the decoder *without*
* calling SET_PCR until preroll is finished.
* XXX: if you want PREROLL just call ES_OUT_SET_NEXT_DISPLAY_TIME and send$
* as you would normally do.
*/
ES_OUT_SET_PCR, /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
ES_OUT_SET_GROUP_PCR, /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
......
......@@ -509,7 +509,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_EGENERIC;
}
UpdateSeekPoint( p_demux, i64 );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
p_sys->i_pcr = -1; /* Invalidate time display */
}
return VLC_SUCCESS;
......@@ -540,7 +539,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
return VLC_EGENERIC;
}
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
p_sys->i_pcr = -1; /* Invalidate time display */
UpdateSeekPoint( p_demux, i64 );
return VLC_SUCCESS;
......@@ -626,7 +624,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
return VLC_EGENERIC;
}
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
p_sys->i_pcr = -1; /* Invalidate time display */
UpdateSeekPoint( p_demux, i64 );
return VLC_SUCCESS;
......
......@@ -420,7 +420,6 @@ switch( i_query )
{
ModPlug_Seek( p_sys->f, i64 / 1000 );
p_sys->i_time = i64 + 1;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return VLC_SUCCESS;
}
......@@ -443,7 +442,6 @@ switch( i_query )
{
ModPlug_Seek( p_sys->f, i64 / 1000 );
p_sys->i_time = i64 + 1;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return VLC_SUCCESS;
}
......
......@@ -1252,7 +1252,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys->env->getResultMsg() );
return VLC_EGENERIC;
}
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
p_sys->i_pcr = 0;
/* Retrieve RTP-Info values */
......@@ -1338,7 +1337,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys->i_npt_start = 0;
p_sys->i_pcr = 0;
p_sys->i_npt = 0.;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
*pi_int = (int)( INPUT_RATE_DEFAULT / p_sys->ms->scale() + 0.5 );
return VLC_SUCCESS;
......
......@@ -649,7 +649,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
{
ParseCluster();
msg_Dbg( &sys.demuxer, "we found a cluster that is in the neighbourhood" );
es_out_Control( sys.demuxer.out, ES_OUT_RESET_PCR );
return;
}
}
......@@ -690,8 +689,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
sys.i_start_pts = i_date;
es_out_Control( sys.demuxer.out, ES_OUT_RESET_PCR );
/* now parse until key frame */
i_track_skipping = 0;
for( i_track = 0; i_track < tracks.size(); i_track++ )
......@@ -744,7 +741,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
}
if( !tracks[i_track]->b_search_keyframe )
{
//es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, sys.i_pts );
BlockDecode( &sys.demuxer, block, simpleblock, sys.i_pts, 0, i_block_ref1 >= 0 || i_block_ref2 > 0 );
}
}
......@@ -865,10 +861,10 @@ static int Demux( demux_t *p_demux)
else
p_sys->i_pts = (p_sys->i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
if( p_sys->i_pts >= p_sys->i_start_pts )
{
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
{
i_return = 1;
......
......@@ -327,7 +327,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
ModPlug_Seek( p_sys->f, i64 / 1000 );
p_sys->i_time = i64 + 1;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return VLC_SUCCESS;
}
......@@ -350,7 +349,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
ModPlug_Seek( p_sys->f, i64 / 1000 );
p_sys->i_time = i64 + 1;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return VLC_SUCCESS;
}
......
......@@ -343,11 +343,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
f = (double) va_arg( args, double );
i64 = stream_Size( p_demux->s );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
if( stream_Seek( p_demux->s, (int64_t)(i64 * f) ) || ReSynch( p_demux ) )
{
return VLC_EGENERIC;
}
p_sys->i_time = -1; /* Invalidate time display */
return VLC_SUCCESS;
......
......@@ -449,7 +449,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
f = (double) va_arg( args, double );
i64 = stream_Size( p_demux->s );
p_sys->i_current_pts = 0;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return stream_Seek( p_demux->s, (int64_t)(i64 * f) );
......@@ -494,7 +493,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
int64_t i_offset = i_pos / (i_now / 1000000) * ((i64 - i_now) / 1000000);
stream_Seek( p_demux->s, i_pos + i_offset);
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return VLC_SUCCESS;
}
return VLC_EGENERIC;
......
......@@ -294,7 +294,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
f = (double) va_arg( args, double );
i64 = stream_Size( p_demux->s );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
if( stream_Seek( p_demux->s, (int64_t)(i64 * f) ) || ReSynch( p_demux ) )
{
return VLC_EGENERIC;
......
......@@ -794,7 +794,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
msg_Dbg(p_demux, "Seek in real rtsp stream!");
p_sys->i_pcr = (int64_t)1000 * ( p_sys->i_our_duration * f );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
p_sys->b_seek = 1;
return stream_Seek( p_demux->s, p_sys->i_pcr );
......@@ -819,8 +818,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys->i_pcr = 1000 * (int64_t) p_index->time_offset;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
return stream_Seek( p_demux->s, i64 );
}
case DEMUX_SET_TIME:
......@@ -840,7 +837,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
p_sys->i_pcr = 1000 * (int64_t) p_index->time_offset;
es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
return stream_Seek( p_demux->s, i64 );
......
......@@ -1235,11 +1235,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
f = (double) va_arg( args, double );
i64 = stream_Size( p_demux->s );
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
if( stream_Seek( p_demux->s, (int64_t)(i64 * f) ) )
{
return VLC_EGENERIC;
}
return VLC_SUCCESS;
#if 0
......
......@@ -236,7 +236,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_SET_POSITION:
f = (double)va_arg( args, double );
i64 = (int64_t)(f * (stream_Size( p_demux->s ) - p_sys->i_start));
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
if( i64 > 0 )
{
int64_t tmp = 0;
......
......@@ -1104,7 +1104,6 @@ static int ty_stream_seek_pct(demux_t *p_demux, double seek_pct)
/* to hell with syncing any audio or video, just start reading records... :) */
/*p_sys->lastAudioPTS = p_sys->lastVideoPTS = 0;*/
es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
return VLC_SUCCESS;
}
......
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