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 dfd5dfb..07a35e9 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 );
             }