[vlc-commits] demux: asf: only substract preroll from presentation time and duration
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 16:51:04 2013 +0900| [882f2d61180be43b54e3639d120f318b79fc9303] | committer: Francois Cartegnie
demux: asf: only substract preroll from presentation time and duration
Offsets pts & duration
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=882f2d61180be43b54e3639d120f318b79fc9303
---
modules/demux/asf/asf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index d56d0d4..1037592 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -673,6 +673,7 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
ParsePayloadExtensions( p_demux, p_sys->track[i_stream_number], pkt,
i_replicated_data_length, &b_packet_keyframe );
+ i_base_pts -= p_sys->p_fp->i_preroll;
pkt->i_skip += i_replicated_data_length;
if( ! pkt->left || pkt->i_skip >= pkt->left )
@@ -685,6 +686,7 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
/* Next byte is Presentation Time Delta */
i_pts_delta = pkt->p_peek[pkt->i_skip];
i_base_pts = (mtime_t)i_media_object_offset;
+ i_base_pts -= p_sys->p_fp->i_preroll;
pkt->i_skip++;
i_media_object_offset = 0;
}
@@ -693,7 +695,6 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
i_base_pts = (mtime_t)pkt->send_time;
}
- i_base_pts -= p_sys->p_fp->i_preroll;
if (i_base_pts < 0) i_base_pts = 0; // FIXME?
i_base_pts *= 1000;
More information about the vlc-commits
mailing list