<div dir="ltr"><div>ping?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 24, 2017 at 4:18 PM, Zhao Zhili <span dir="ltr"><<a href="mailto:wantlamy@gmail.com" target="_blank">wantlamy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>I have a video with two data stream:<br></div><div> Duration: 01:14:10.80, start: 0.000000, bitrate: 404 kb/s<br>    Stream #0:0: Audio: cook (cook / 0x6B6F6F63), 44100 Hz, stereo, fltp, 64 kb/s<br>    Stream #0:1: Video: rv40 (RV40 / 0x30345652), yuv420p, 608x256, 332 kb/s, 30 fps, 30 tbr, 1k tbn, 1k tbc<br>    Stream #0:2: Data: none, 0 kb/s<br>    Stream #0:3: Data: none, 0 kb/s<br>Unsupported codec with id 0 for input stream 2<br>Unsupported codec with id 0 for input stream 3</div><div><span><span><br></span></span></div><div class="gmail_extra">Without this patch, VLC doesn't refresh position (or time) information at the first few </div><div class="gmail_extra">seconds. The MainLoop in input.c sleep too long before run MainLoopStatistics. I think </div><div class="gmail_extra">PCR updating should not take account of those invalid streams, but I'm not sure.</div><div><div class="h5"><div class="gmail_extra"><span><span><br></span></span></div><div class="gmail_quote">On Wed, Mar 22, 2017 at 4:13 PM, Jean-Baptiste Kempf <span dir="ltr"><<a href="mailto:jb@videolan.org" target="_blank">jb@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">ping for review<br>
<div><div class="m_-4333223131985301113gmail-h5"><br>
On Mon, 20 Mar 2017, at 16:56, Zhao Zhili wrote:<br>
> ---<br>
>  modules/demux/avformat/demux.c | 11 ++++++++---<br>
>  1 file changed, 8 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/modules/demux/avformat/demux<wbr>.c<br>
> b/modules/demux/avformat/demux<wbr>.c<br>
> index 4824215..48ba7f8 100644<br>
> --- a/modules/demux/avformat/demux<wbr>.c<br>
> +++ b/modules/demux/avformat/demux<wbr>.c<br>
> @@ -834,17 +834,22 @@ static int Demux( demux_t *p_demux )<br>
>      msg_Dbg( p_demux, "tk[%d] dts=%"PRId64" pts=%"PRId64,<br>
>               pkt.stream_index, p_frame->i_dts, p_frame->i_pts );<br>
>  #endif<br>
> -    if( p_frame->i_dts > VLC_TS_INVALID )<br>
> +    if( p_frame->i_dts > VLC_TS_INVALID && p_sys->tk[pkt.stream_index]<br>
> != NULL )<br>
>          p_sys->tk_pcr[pkt.stream_index<wbr>] = p_frame->i_dts;<br>
><br>
>      int64_t i_ts_max = INT64_MIN;<br>
>      for( int i = 0; i < p_sys->i_tk; i++ )<br>
> -        i_ts_max = __MAX( i_ts_max, p_sys->tk_pcr[i] );<br>
> +    {<br>
> +        if( p_sys->tk[i] != NULL )<br>
> +            i_ts_max = __MAX( i_ts_max, p_sys->tk_pcr[i] );<br>
> +    }<br>
><br>
>      int64_t i_ts_min = INT64_MAX;<br>
>      for( int i = 0; i < p_sys->i_tk; i++ )<br>
>      {<br>
> -        if( p_sys->tk_pcr[i] > VLC_TS_INVALID && p_sys->tk_pcr[i] + 10 *<br>
> CLOCK_FREQ >= i_ts_max )<br>
> +        if( p_sys->tk[i] != NULL &&<br>
> +                p_sys->tk_pcr[i] > VLC_TS_INVALID &&<br>
> +                p_sys->tk_pcr[i] + 10 * CLOCK_FREQ >= i_ts_max )<br>
>              i_ts_min = __MIN( i_ts_min, p_sys->tk_pcr[i] );<br>
>      }<br>
>      if( i_ts_min >= p_sys->i_pcr )<br>
> --<br>
> 2.10.1 (Apple Git-78)<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank" rel="noreferrer">https://mailman.videolan.org/l<wbr>istinfo/vlc-devel</a><br>
> Email had 1 attachment:<br>
> + 0001-demux-avformat-do-not-tak<wbr>e-account-of-invalid-stream.<wbr>patch<br>
>   2k (text/plain)<br>
<span class="m_-4333223131985301113gmail-HOEnZb"><font color="#888888"><br>
<br>
--<br>
Jean-Baptiste Kempf -  President<br>
<a href="tel:%2B33%20672%20704%20734" target="_blank" value="+33672704734">+33 672 704 734</a><br>
______________________________<wbr>_________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank" rel="noreferrer">https://mailman.videolan.org/l<wbr>istinfo/vlc-devel</a></font></span></blockquote></div><div class="gmail_extra"><br></div></div></div></div>
</blockquote></div><br></div></div>