[vlc-devel] commit: Improved a bit more asf pcr. (Laurent Aimar )

git version control git at videolan.org
Sat Jul 11 18:43:59 CEST 2009


vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Sat Jul 11 18:24:42 2009 +0200| [56cf166c05dfae63664ddab7c052592379d6ae99] | committer: Jean-Baptiste Kempf 

Improved a bit more asf pcr.
(cherry picked from commit 97140ee9e5c85b1ebbff8e2eb1d91006d4ae96a9)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=56cf166c05dfae63664ddab7c052592379d6ae99
---

 modules/demux/asf/asf.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 7cf31ad..1f63bbd 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -594,8 +594,10 @@ static int DemuxPacket( demux_t *p_demux )
                 /* send complete packet to decoder */
                 block_t *p_gather = block_ChainGather( tk->p_frame );
 
+                tk->i_time = p_gather->i_dts;
+
                 if( p_sys->i_time < 0 )
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, tk->i_time );
+                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, tk->i_time+1 );
 
                 es_out_Send( p_demux->out, tk->p_es, p_gather );
 
@@ -615,11 +617,7 @@ static int DemuxPacket( demux_t *p_demux )
 
             if( tk->p_frame == NULL )
             {
-                tk->i_time =
-                    ( (mtime_t)i_pts + i_payload * (mtime_t)i_pts_delta );
-
-                p_frag->i_pts = tk->i_time;
-
+                p_frag->i_pts = i_pts + i_payload * (mtime_t)i_pts_delta;
                 if( tk->i_cat != VIDEO_ES )
                     p_frag->i_dts = p_frag->i_pts;
                 else




More information about the vlc-devel mailing list