ossia/score

AVFormatContext interrupt_callback support

オープン

#1,792 opened on 2025/05/27

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (126 件のフォーク)auto 404
ODHack14easygood first issue

Repository metrics

Stars
 (2,035 個のスター)
PR merge metrics
 (PR metrics pending)

説明

needed to handle proper camera unplugging:

+++ b/src/plugins/score-plugin-media/Video/CameraInput.cpp
@@ -71,6 +71,9 @@ bool CameraInput::start() noexcept
   m_formatContext->flags |= AVFMT_FLAG_NOBUFFER;
   m_formatContext->flags |= AVFMT_FLAG_FLUSH_PACKETS;
 
+  m_formatContext->interrupt_callback.callback = +[](void*) -> int { return 1; };
+  m_formatContext->interrupt_callback.opaque = 0;
+
   AVDictionary* options = nullptr;

コントリビューターガイド