[vlc-commits] demux: avi: simplify dpts code
Francois Cartegnie
git at videolan.org
Mon Oct 6 17:04:25 CEST 2014
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Sep 18 15:17:55 2014 +0200| [836a4433517c0ad1b9c04e18aa182f2b263b3eba] | committer: Jean-Baptiste Kempf
demux: avi: simplify dpts code
(cherry picked from commit 5e4b6380fc0468acde12957eb7aa4b9784874565)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=836a4433517c0ad1b9c04e18aa182f2b263b3eba
---
modules/demux/avi/avi.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 989c111..2169c8a 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1005,7 +1005,6 @@ static int Demux_Seekable( demux_t *p_demux )
for( i_track = 0; i_track < p_sys->i_track; i_track++ )
{
avi_track_t *tk = p_sys->track[i_track];
- mtime_t i_dpts;
toread[i_track].b_ok = tk->b_activated && !tk->b_eof;
if( tk->i_idxposc < tk->idx.i_size )
@@ -1021,20 +1020,15 @@ static int Demux_Seekable( demux_t *p_demux )
toread[i_track].i_posf = -1;
}
- i_dpts = p_sys->i_time - AVI_GetPTS( tk );
+ mtime_t i_dpts = p_sys->i_time - AVI_GetPTS( tk );
if( tk->i_samplesize )
{
- toread[i_track].i_toread = AVI_PTSToByte( tk, llabs( i_dpts ) );
+ toread[i_track].i_toread = AVI_PTSToByte( tk, i_dpts );
}
else if ( i_dpts > -2 * CLOCK_FREQ ) /* don't send a too early dts (low fps video) */
{
- toread[i_track].i_toread = AVI_PTSToChunk( tk, llabs( i_dpts ) );
- }
-
- if( i_dpts < 0 )
- {
- toread[i_track].i_toread *= -1;
+ toread[i_track].i_toread = AVI_PTSToChunk( tk, i_dpts );
}
else
toread[i_track].i_toread = -1;
More information about the vlc-commits
mailing list