[vlc-devel] [PATCH 1/2] stream_filter: smooth: fix segfault

Frédéric Yhuel yhuelf at gmail.com
Sun Nov 30 21:17:40 CET 2014


---
 modules/stream_filter/smooth/smooth.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/smooth/smooth.c b/modules/stream_filter/smooth/smooth.c
index dfd5dfb..07a35e9 100644
--- a/modules/stream_filter/smooth/smooth.c
+++ b/modules/stream_filter/smooth/smooth.c
@@ -756,7 +756,11 @@ static unsigned int sms_Read( stream_t *s, uint8_t *p_read, unsigned int i_read
             else
             {
                 vlc_mutex_lock( &p_sys->lock );
-                gotoNextChunk( p_sys );
+                if( gotoNextChunk( p_sys ) == NULL )
+                {
+                    vlc_mutex_unlock( &p_sys->lock );
+                    return 0;
+                }
                 vlc_mutex_unlock( &p_sys->lock );
             }
 
-- 
2.1.3




More information about the vlc-devel mailing list