mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-05 16:46:58 +08:00
等待视频信号转发后再转发音频信号
This commit is contained in:
@@ -136,6 +136,10 @@ func (s *OutputStream) sendVideo(video *avformat.AVPacket) error {
|
|||||||
return s.sendVideo(video)
|
return s.sendVideo(video)
|
||||||
}
|
}
|
||||||
func (s *OutputStream) sendAudio(audio *avformat.AVPacket) error {
|
func (s *OutputStream) sendAudio(audio *avformat.AVPacket) error {
|
||||||
|
if !s.VTSent {
|
||||||
|
audio.Recycle()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if s.ATSent {
|
if s.ATSent {
|
||||||
if s.FirstScreen != nil && s.firstScreenIndex == -1 {
|
if s.FirstScreen != nil && s.firstScreenIndex == -1 {
|
||||||
audio.Recycle()
|
audio.Recycle()
|
||||||
|
Reference in New Issue
Block a user