X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2Fsrc%2Fmodules%2Fsdl%2Fconsumer_sdl.c;h=2725d1df715f55d3078866176c15575dd7b00cea;hb=8bf137cd71aafb9c8f6a42c78ddb6bd0a8fe99db;hp=714fc66f5a6351512192b8b14b781d74601415ac;hpb=1a50e779cfd5e1bc6a80054f6f56e64280c2dc41;p=melted diff --git a/mlt/src/modules/sdl/consumer_sdl.c b/mlt/src/modules/sdl/consumer_sdl.c index 714fc66..2725d1d 100644 --- a/mlt/src/modules/sdl/consumer_sdl.c +++ b/mlt/src/modules/sdl/consumer_sdl.c @@ -199,7 +199,7 @@ static int consumer_play_audio( consumer_sdl this, mlt_frame frame, int init_aud // Get the properties of this consumer mlt_properties properties = this->properties; mlt_audio_format afmt = mlt_audio_pcm; - int channels; + int channels = 0; int samples; int frequency; int16_t *pcm; @@ -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; } }