Browse Source

Update VideoPlayer.cpp

修复判断SDL打开失败,判断错误的问题。
huihui 5 years ago
parent
commit
b7f63c5b8a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      module/VideoPlayer/src/VideoPlayer/VideoPlayer.cpp

+ 2 - 2
module/VideoPlayer/src/VideoPlayer/VideoPlayer.cpp

@@ -185,10 +185,10 @@ int VideoPlayer::openSDL()
     }
 
     /* 检查实际使用的配置(保存在spec,由SDL_OpenAudio()填充) */
-    if (spec.format != AUDIO_S16SYS)
+//    if (spec.format != AUDIO_S16SYS)
+    if (mAudioID <= 0)
     {
         mIsAudioThreadFinished = true;
-
         return -1;
     }
 fprintf(stderr, "mAudioID=%d\n\n\n\n\n\n", mAudioID);