]> git.sesse.net Git - vlc/commitdiff
stream_filter: smooth: fix segfault
authorFrédéric Yhuel <yhuelf@gmail.com>
Sun, 30 Nov 2014 20:17:40 +0000 (21:17 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 1 Dec 2014 10:08:56 +0000 (11:08 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/stream_filter/smooth/smooth.c

index dfd5dfbe41e3c1c378fed06aa08aea035a19bb5e..07a35e91a87c4f966804ac39aa1425c70cd5b7b7 100644 (file)
@@ -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 );
             }