[vlc-devel] [PATCH 11/24] [packetizer/dirac] Add const +1 offset to dts/pts to avoid pts=0
davidf+nntp at woaf.net
davidf+nntp at woaf.net
Thu Oct 30 12:29:40 CET 2008
From: David Flynn <davidf at rd.bbc.co.uk>
The sout throws away packets with dts=pts=0.
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
modules/packetizer/dirac.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/packetizer/dirac.c b/modules/packetizer/dirac.c
index dd12754..c759503 100644
--- a/modules/packetizer/dirac.c
+++ b/modules/packetizer/dirac.c
@@ -261,12 +261,11 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
p_sys->p_frame = NULL;
p_sys->pp_last = &p_sys->p_frame;
- p_pic->i_pts = date_Increment( &pts, u_picnum );
- p_pic->i_dts = date_Get( &p_sys->m_dts );
- date_Increment( &p_sys->m_dts, 3);
+ p_pic->i_pts = date_Increment( &pts, u_picnum ) + 1;
+ p_pic->i_dts = date_Get( &p_sys->m_dts ) + 1;
+ date_Increment( &p_sys->m_dts, 1);
- p_pic->i_dts =
- p_pic->i_pts = u_picnum * INT64_C(1000000) / ((float) p_sys->m_seq_hdr.u_fps_num / p_sys->m_seq_hdr.u_fps_den);
+ p_pic->i_pts = 1 + u_picnum * INT64_C(1000000) / ((float) p_sys->m_seq_hdr.u_fps_num / p_sys->m_seq_hdr.u_fps_den);
}
else if( 0 == p_pic->p_buffer[4] ) {
/* we should stash a copy of this -- it isn't allowed to change ever */
--
1.5.6.5
More information about the vlc-devel
mailing list