vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Tue Jun 12 08:21:55 
2018 +0200| [bf29d5933565c0c2f2c361b60527aa1b254863ef] | committer: Steve Lhomme

sout:chromecast: fix potential crash if a demuxer reports 0 as an OK duration

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

 modules/stream_out/chromecast/chromecast_demux.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/chromecast_demux.cpp 
b/modules/stream_out/chromecast/chromecast_demux.cpp
index 02e20db042..6dbc403bc8 100644
--- a/modules/stream_out/chromecast/chromecast_demux.cpp
+++ b/modules/stream_out/chromecast/chromecast_demux.cpp
@@ -210,7 +210,7 @@ struct demux_cc
 
     double getPosition()
     {
-        if( m_length >= 0 && m_start_pos >= 0 )
+        if( m_length > 0 && m_start_pos >= 0 )
         {
             m_last_pos = ( getCCTime() / double( m_length ) ) + m_start_pos;
             return m_last_pos;

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to