fps: i_output_frame_interval is an mtime_t
authorSteve Lhomme <robux4@ycbcr.xyz>
Thu, 14 Jun 2018 06:59:56 +0000 (08:59 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Thu, 14 Jun 2018 14:15:23 +0000 (16:15 +0200)
modules/video_filter/fps.c

index 43c9676..d44c6de 100644 (file)
@@ -64,7 +64,7 @@ typedef struct
 {
     date_t          next_output_pts; /**< output calculated PTS */
     picture_t       *p_previous_pic;
-    int             i_output_frame_interval;
+    mtime_t         i_output_frame_interval;
 } filter_sys_t;
 
 static picture_t *Filter( filter_t *p_filter, picture_t *p_picture)
@@ -86,7 +86,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_picture)
     /* First time we get some valid timestamp, we'll take it as base for output
         later on we retake new timestamp if it has jumped too much */
     if( unlikely( ( date_Get( &p_sys->next_output_pts ) == VLC_TS_INVALID ) ||
-                   ( p_picture->date > ( date_Get( &p_sys->next_output_pts ) + (mtime_t)p_sys->i_output_frame_interval ) )
+                   ( p_picture->date > ( date_Get( &p_sys->next_output_pts ) + p_sys->i_output_frame_interval ) )
                 ) )
     {
         msg_Dbg( p_filter, "Resetting timestamps" );
@@ -100,7 +100,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_picture)
 
     /* Check if we can skip input as better should follow */
     if( p_picture->date <
-        ( date_Get( &p_sys->next_output_pts ) - (mtime_t)p_sys->i_output_frame_interval ) )
+        ( date_Get( &p_sys->next_output_pts ) - p_sys->i_output_frame_interval ) )
     {
         if( p_sys->p_previous_pic )
             picture_Release( p_sys->p_previous_pic );