[vlc-commits] demux: asf: Use pts as track time instead of dts
Francois Cartegnie
git at videolan.org
Sat Dec 7 19:11:57 CET 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Nov 9 15:54:33 2013 +0900| [6fb815bbf5f356aa6381a7968cd1f1e1edf90814] | committer: Francois Cartegnie
demux: asf: Use pts as track time instead of dts
Use pts as track time, and then for pcr.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6fb815bbf5f356aa6381a7968cd1f1e1edf90814
---
modules/demux/asf/asf.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 6be1039..5348719 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -514,14 +514,22 @@ static void SendPacket(demux_t *p_demux, asf_track_t *tk)
block_t *p_gather = block_ChainGather( tk->p_frame );
- if( p_gather->i_dts > VLC_TS_INVALID )
- tk->i_time = p_gather->i_dts - VLC_TS_0;
+ if( p_gather->i_pts > VLC_TS_INVALID )
+ tk->i_time = p_gather->i_pts - VLC_TS_0;
if( p_sys->i_time < 0 )
- es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_gather->i_dts );
+ {
+ es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_gather->i_pts );
+#ifdef ASF_DEBUG
+ msg_Dbg( p_demux, "setting PCR to %"PRId64, p_gather->i_pts );
+#endif
+ }
- es_out_Send( p_demux->out, tk->p_es, p_gather );
+#ifdef ASF_DEBUG
+ msg_Dbg( p_demux, "sending packet dts %"PRId64" %"PRId64, p_gather->i_dts, p_gather->i_pts );
+#endif
+ es_out_Send( p_demux->out, tk->p_es, p_gather );
tk->p_frame = NULL;
}
@@ -641,6 +649,8 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
"payload(%d) stream_number:%"PRIu8" media_object_number:%d media_object_offset:%"PRIu32" replicated_data_length:%"PRIu32" payload_data_length %"PRIu32,
i_payload + 1, i_stream_number, i_media_object_number,
i_media_object_offset, i_replicated_data_length, i_payload_data_length );
+ msg_Dbg( p_demux,
+ " pts=%"PRId64" st=%"PRIu32, i_pts, pkt->send_time );
#endif
asf_track_t *tk = p_sys->track[i_stream_number];
More information about the vlc-commits
mailing list