[vlc-commits] sout:chromecast: fix potential crash if a demuxer reports 0 as an OK duration
Steve Lhomme
git at videolan.org
Thu Sep 20 12:43:49 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at 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;
More information about the vlc-commits
mailing list