等待视频信号转发后再转发音频信号

This commit is contained in:
langhuihui
2020-03-22 20:42:55 +08:00
parent 00128ce20a
commit f7fe10f69c

View File

@@ -136,6 +136,10 @@ func (s *OutputStream) sendVideo(video *avformat.AVPacket) error {
return s.sendVideo(video)
}
func (s *OutputStream) sendAudio(audio *avformat.AVPacket) error {
if !s.VTSent {
audio.Recycle()
return nil
}
if s.ATSent {
if s.FirstScreen != nil && s.firstScreenIndex == -1 {
audio.Recycle()