瀏覽代碼

Update VideoPlayer.cpp

修复判断SDL打开失败,判断错误的问题。
huihui 5 年之前
父節點
當前提交
b7f63c5b8a
共有 1 個文件被更改,包括 2 次插入2 次删除
  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);