Skip to content

Code fix proposal for "--start-time" option displaying first frames

Hello,

after reading the #9063 ticket, I found a fix for preventing the very first frames to be systematically displayed when using the "--start-time=XXX" command line option, or when playing XSPF format playlists.

I modified the the //EsOutSend// method in src/input/es_out.c (line 1916 in v2.2.4), and added the following lines at line 1920:

1918        es_out_sys_t   *p_sys = out->p_sys;
1919        input_thread_t *p_input = p_sys->p_input;

     1921 + if (p_input->p->i_time < p_input->p->i_start)
     1922 + {
     1923 +     return VLC_SUCCESS;
     1924 + }

1921        if( libvlc_stats( p_input ) )
1922        {

To my understanding: this prevents the first frames to be actually displayed when the stream has not yet reached its 'seek' position (thus the p_input->p->i_time starting at zero and being displayed).

I tested the fix on v2.1.0 (I didn't have time and disk space to install //CygWin// or similar to compile the latest project, so I used a VC2010-compatible project with v2.1.0).

Can someone test the patch and put a feedback here?

G13

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information