[vlc-devel] commit: packetizer_mpeg4video: use VLC_TS_INVALID (refs #3135) ( Rafaël Carré )
git version control
git at videolan.org
Tue Dec 8 10:53:24 CET 2009
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Tue Dec 8 10:52:44 2009 +0100| [f589d6baf66e929b6e70f45dce0d271fecb4a811] | committer: Rafaël Carré
packetizer_mpeg4video: use VLC_TS_INVALID (refs #3135)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f589d6baf66e929b6e70f45dce0d271fecb4a811
---
modules/packetizer/mpeg4video.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/modules/packetizer/mpeg4video.c b/modules/packetizer/mpeg4video.c
index 82bcd5d..b482c61 100644
--- a/modules/packetizer/mpeg4video.c
+++ b/modules/packetizer/mpeg4video.c
@@ -219,7 +219,8 @@ static void PacketizeReset( void *p_private, bool b_broken )
p_sys->i_interpolated_pts =
p_sys->i_interpolated_dts =
- p_sys->i_last_ref_pts =
+ p_sys->i_last_ref_pts = VLC_TS_INVALID;
+
p_sys->i_last_time_ref =
p_sys->i_time_ref =
p_sys->i_last_time =
@@ -247,8 +248,8 @@ static int PacketizeValidate( void *p_private, block_t *p_au )
/* We've just started the stream, wait for the first PTS.
* We discard here so we can still get the sequence header. */
- if( p_sys->i_interpolated_pts <= 0 &&
- p_sys->i_interpolated_dts <= 0 )
+ if( p_sys->i_interpolated_pts <= VLC_TS_INVALID &&
+ p_sys->i_interpolated_dts <= VLC_TS_INVALID )
{
msg_Dbg( p_dec, "need a starting pts/dts" );
return VLC_EGENERIC;
@@ -501,9 +502,9 @@ static int ParseVOP( decoder_t *p_dec, block_t *p_vop )
p_sys->i_last_timeincr = i_time_increment;
/* Correct interpolated dts when we receive a new pts/dts */
- if( p_vop->i_pts > 0 )
+ if( p_vop->i_pts > VLC_TS_INVALID )
p_sys->i_interpolated_pts = p_vop->i_pts;
- if( p_vop->i_dts > 0 )
+ if( p_vop->i_dts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_vop->i_dts;
if( (p_sys->i_flags & BLOCK_FLAG_TYPE_B) || !p_sys->b_frame )
@@ -512,16 +513,16 @@ static int ParseVOP( decoder_t *p_dec, block_t *p_vop )
p_sys->i_interpolated_dts = p_sys->i_interpolated_pts;
- if( p_vop->i_pts > 0 )
+ if( p_vop->i_pts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_vop->i_pts;
- if( p_vop->i_dts > 0 )
+ if( p_vop->i_dts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_vop->i_dts;
p_sys->i_interpolated_pts = p_sys->i_interpolated_dts;
}
else
{
- if( p_sys->i_last_ref_pts > 0 )
+ if( p_sys->i_last_ref_pts > VLC_TS_INVALID )
p_sys->i_interpolated_dts = p_sys->i_last_ref_pts;
p_sys->i_last_ref_pts = p_sys->i_interpolated_pts;
More information about the vlc-devel
mailing list