track WriteSample fix log message.

This commit is contained in:
Miroslav Šedivý 2022-12-12 22:53:26 +01:00
parent 05c4fa34c5
commit 919a554a9e

View File

@ -50,8 +50,8 @@ func NewTrack(logger zerolog.Logger, codec codec.RTPCodec, connection *webrtc.Pe
} }
err := track.WriteSample(media.Sample(sample)) err := track.WriteSample(media.Sample(sample))
if err != nil && errors.Is(err, io.ErrClosedPipe) { if err != nil && !errors.Is(err, io.ErrClosedPipe) {
logger.Warn().Err(err).Msg("pipeline failed to write") logger.Warn().Err(err).Msg("failed to write sample to track")
} }
} }