Commit bbd9cc3c authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: don't seek on current position

parent 931a5be2
...@@ -733,16 +733,20 @@ static int Demux( demux_t *p_demux ) ...@@ -733,16 +733,20 @@ static int Demux( demux_t *p_demux )
if( i_samplessize > 0 ) if( i_samplessize > 0 )
{ {
block_t *p_block; block_t *p_block;
int64_t i_delta; int64_t i_delta, i_newpos;
/* go,go go ! */ /* go,go go ! */
if( stream_Seek( p_demux->s, MP4_TrackGetPos( tk ) ) ) i_newpos = MP4_TrackGetPos( tk );
if( stream_Tell( p_demux->s ) != i_newpos )
{
if( stream_Seek( p_demux->s, i_newpos ) )
{ {
msg_Warn( p_demux, "track[0x%x] will be disabled (eof?)", msg_Warn( p_demux, "track[0x%x] will be disabled (eof?)",
tk->i_track_ID ); tk->i_track_ID );
MP4_TrackUnselect( p_demux, tk ); MP4_TrackUnselect( p_demux, tk );
break; break;
} }
}
/* now read pes */ /* now read pes */
if( !(p_block = stream_Block( p_demux->s, i_samplessize )) ) if( !(p_block = stream_Block( p_demux->s, i_samplessize )) )
......
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