<ul dir="auto">
<li>OpenCV =&gt; master</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">A typo in the get_duration_sec method is possible - two times the same condition is written.</p>
<p dir="auto"><a href="https://github.com/opencv/opencv/blob/3.3.1/modules/videoio/src/cap_ffmpeg_impl.hpp#L1103">https://github.com/opencv/opencv/blob/3.3.1/modules/videoio/src/cap_ffmpeg_impl.hpp#L1103</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  double CvCapture_FFMPEG::get_duration_sec() const
{
    double sec = (double)ic-&gt;duration / (double)AV_TIME_BASE;

   if (sec &lt; eps_zero)  
    {
        sec = (double)ic-&gt;streams[video_stream]-&gt;duration * r2d(ic-&gt;streams[video_stream]-&gt;time_base);
    }

    if (sec &lt; eps_zero) // repeat?
    {
        sec = (double)ic-&gt;streams[video_stream]-&gt;duration * r2d(ic-&gt;streams[video_stream]-&gt;time_base);
    } 

    return sec;
}"><pre class="notranslate"><code class="notranslate">  double CvCapture_FFMPEG::get_duration_sec() const
{
    double sec = (double)ic-&gt;duration / (double)AV_TIME_BASE;

   if (sec &lt; eps_zero)  
    {
        sec = (double)ic-&gt;streams[video_stream]-&gt;duration * r2d(ic-&gt;streams[video_stream]-&gt;time_base);
    }

    if (sec &lt; eps_zero) // repeat?
    {
        sec = (double)ic-&gt;streams[video_stream]-&gt;duration * r2d(ic-&gt;streams[video_stream]-&gt;time_base);
    } 

    return sec;
}
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/opencv/opencv
cd opencv
mkdir build
cd build
pwd
#prints: /Users/username/opencv/build
python ../platforms/js/build_js.py . --build_wasm
DESTDIR=/tmp/build make install"><pre class="notranslate"><code class="notranslate">git clone https://github.com/opencv/opencv
cd opencv
mkdir build
cd build
pwd
#prints: /Users/username/opencv/build
python ../platforms/js/build_js.py . --build_wasm
DESTDIR=/tmp/build make install
</code></pre></div>
<p dir="auto">this builds under /tmp/build/Users/username/opencv/build/install/{lib,include,...}<br>
instead of /tmp/build/usr/local/{lib,include,...}<br>
(eg that'd be the behavior of other software like libjpeg)</p>
<p dir="auto">NOTE: this is independent building via ../platforms/js/build_js.py, would've been same with standard build followed by <code class="notranslate">DESTDIR=/tmp/build make install</code></p>