ffplay: do not init SDL audio if -an is specified. n0.8
authorClément Bœsch <clement.boesch@smartjog.com>
Tue, 21 Jun 2011 09:25:25 +0000 (11:25 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Jun 2011 19:41:31 +0000 (21:41 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffplay.c

index 81b1fce..96a8517 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -3032,6 +3032,8 @@ int main(int argc, char **argv)
         video_disable = 1;
     }
     flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
+    if (audio_disable)
+        flags &= ~SDL_INIT_AUDIO;
 #if !defined(__MINGW32__) && !defined(__APPLE__)
     flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
 #endif