[vlc-commits] demux: nuv: don't compute the seekpoint time if it's invalid

Steve Lhomme git at videolan.org
Wed Sep 19 15:46:13 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun  1 13:04:33 2018 +0200| [2051d7c0fd458fd89dd0d42188d6f255c30c26fb] | committer: Steve Lhomme

demux: nuv: don't compute the seekpoint time if it's invalid

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2051d7c0fd458fd89dd0d42188d6f255c30c26fb
---

 modules/demux/nuv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c
index 2590c347b9..cf16e59fc7 100644
--- a/modules/demux/nuv.c
+++ b/modules/demux/nuv.c
@@ -848,13 +848,13 @@ static int SeekTableLoad( demux_t *p_demux, demux_sys_t *p_sys )
             kfa_entry_id++;
         }
 
-        i_time = (double)( (vlc_tick_t)frame * CLOCK_FREQ ) / p_sys->hdr.d_fps;
         i_offset = GetQWLE( p_seek_table + j * 12 );
 
-        if( i_offset == 0 && i_time != 0 )
+        if( i_offset == 0 && frame != 0 )
             msg_Dbg( p_demux, "invalid file offset %d %"PRIi64, keyframe, i_offset );
         else
         {
+            i_time = (double)( (vlc_tick_t)frame * CLOCK_FREQ ) / p_sys->hdr.d_fps;
             demux_IndexAppend( &p_sys->idx, i_time , i_offset );
 #if 0
             msg_Dbg( p_demux, "adding entry position %d %"PRIi64 " file offset %"PRIi64, keyframe, i_time, i_offset );



More information about the vlc-commits mailing list