[vlc-commits] Handle MKV segment change properly
Denis Charmet
git at videolan.org
Thu Feb 2 15:06:22 CET 2012
vlc | branch: master | Denis Charmet <typx at dinauz.org> | Thu Feb 2 01:42:54 2012 +0100| [87ed819bada9492bc4b2e6e0ff2859797946edf5] | committer: Jean-Baptiste Kempf
Handle MKV segment change properly
Don't use the var_SetTime hack anymore and don't flush the fifo when
it's not necessary.
Fix #5967 and #2855
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87ed819bada9492bc4b2e6e0ff2859797946edf5
---
modules/demux/mkv/mkv.cpp | 5 ++---
modules/demux/mkv/virtual_segment.cpp | 4 +---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 104cac8..eedeba1 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -668,7 +668,7 @@ static int Demux( demux_t *p_demux)
if( p_sys->i_pts >= p_sys->i_start_pts )
if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
{
- i_return = ( i_block_count != 0 );
+ i_return = 1;
break;
}
@@ -694,7 +694,7 @@ static int Demux( demux_t *p_demux)
/* TODO handle successive chapters with the same user_start_time/user_end_time
*/
p_sys->i_pts = p_chap->i_virtual_stop_time;
- p_sys->i_start_pts = p_sys->i_pts++; // trick to avoid staying on segments with no duration and no content
+ p_sys->i_pts++; // trick to avoid staying on segments with no duration and no content
i_return = 1;
}
@@ -704,7 +704,6 @@ static int Demux( demux_t *p_demux)
else
{
msg_Warn( p_demux, "cannot get block EOF?" );
- es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
break;
}
}
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 0f667f2..d790357 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -386,8 +386,7 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
( p_current_chapter->p_chapter->i_end_time != p_cur_chapter->p_chapter->i_start_time ) ||
( p_current_chapter && p_current_chapter->p_segment != p_cur_chapter->p_segment ) )
{
- /* hack : we have to use input to seek in order to clean buffers */
- var_SetTime( demux.p_sys->p_input, "time", p_cur_chapter->i_virtual_start_time );
+ Seek( demux, p_cur_chapter->i_virtual_start_time, 0, p_cur_chapter, -1 );
return true;
}
}
@@ -450,7 +449,6 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_
if( p_current_chapter->p_segment != p_chapter->p_segment )
{
- es_out_Control( demuxer.out, ES_OUT_RESET_PCR );
p_chapter->p_segment->Select( i_date );
p_current_chapter->p_segment->UnSelect();
}
More information about the vlc-commits
mailing list