]> git.sesse.net Git - vlc/commitdiff
Improved a bit more asf pcr.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 11 Jul 2009 16:24:42 +0000 (18:24 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 11 Jul 2009 16:35:48 +0000 (18:35 +0200)
modules/demux/asf/asf.c

index ceef0d02a2768d2ec9d125801c7a5bbc215d62d4..3985cdf9ac991370497b6e4d8d1d90cdb8b068a9 100644 (file)
@@ -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