Advertisement
Guest User

Untitled

a guest
Feb 14th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
  2. index eedeba1..f1d9dc7 100644
  3. --- a/modules/demux/mkv/mkv.cpp
  4. +++ b/modules/demux/mkv/mkv.cpp
  5. @@ -650,6 +650,7 @@ msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_b
  6. *****************************************************************************/
  7. static int Demux( demux_t *p_demux)
  8. {
  9. + static mtime_t next_pcr = 0;
  10. demux_sys_t *p_sys = p_demux->p_sys;
  11.  
  12. vlc_mutex_lock( &p_sys->lock_demuxer );
  13. @@ -714,9 +715,10 @@ static int Demux( demux_t *p_demux)
  14. p_sys->i_pts = p_sys->i_chapter_time + ( block->GlobalTimecode() / (mtime_t) 1000 );
  15.  
  16. /* The blocks are in coding order so we can safely consider that only references are in chronological order */
  17. +/*
  18. if( simpleblock == NULL || b_key_picture )
  19. es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pts );
  20. -
  21. +*/
  22. if( p_sys->i_pts >= p_sys->i_start_pts )
  23. {
  24. if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
  25. @@ -738,6 +740,11 @@ static int Demux( demux_t *p_demux)
  26.  
  27. BlockDecode( p_demux, block, simpleblock, p_sys->i_pts, i_block_duration, b_key_picture || b_discardable_picture );
  28.  
  29. + if( p_sys->i_pts > next_pcr + 200000 )
  30. + {
  31. + es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + next_pcr );
  32. + next_pcr = p_sys->i_pts;
  33. + }
  34. delete block;
  35. i_block_count++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement