miracle part 1
[melted] / mlt / src / modules / sdl / consumer_sdl.c
index 7ad3414..85852d5 100644 (file)
@@ -148,7 +148,7 @@ static void sdl_unlock_display( )
                SDL_UnlockSurface( screen );
 }
 
-void sdl_fill_audio( void *udata, uint8_t *stream, int len )
+static void sdl_fill_audio( void *udata, uint8_t *stream, int len )
 {
        consumer_sdl this = udata;
 
@@ -232,13 +232,10 @@ static int consumer_play_audio( consumer_sdl this, mlt_frame frame, int init_aud
                        fprintf( stderr, "SDL failed to open audio: %s\n", SDL_GetError() );
                        init_audio = 2;
                }
-               else
+               else if ( got.size != 0 )
                {
-                       if ( got.size != 0 )
-                       {
-                               SDL_PauseAudio( 0 );
-                               init_audio = 0;
-                       }
+                       SDL_PauseAudio( 0 );
+                       init_audio = 0;
                }
        }