Browse Source

hls, rtmp: print clearer error messages (#501)

in case a stream doesn't contain a H264 track
or a AAC track.
pull/509/head
aler9 4 years ago
parent
commit
0de711d7e0
  1. 2
      internal/core/hls_remuxer.go
  2. 2
      internal/core/rtmp_conn.go

2
internal/core/hls_remuxer.go

@ -287,7 +287,7 @@ func (r *hlsRemuxer) runRemuxer(remuxerCtx context.Context, remuxerReady chan st @@ -287,7 +287,7 @@ func (r *hlsRemuxer) runRemuxer(remuxerCtx context.Context, remuxerReady chan st
}
if videoTrack == nil && audioTrack == nil {
return fmt.Errorf("unable to find a video or audio track")
return fmt.Errorf("the stream doesn't contain an H264 track or an AAC track")
}
var err error

2
internal/core/rtmp_conn.go

@ -264,7 +264,7 @@ func (c *rtmpConn) runRead(ctx context.Context) error { @@ -264,7 +264,7 @@ func (c *rtmpConn) runRead(ctx context.Context) error {
}
if videoTrack == nil && audioTrack == nil {
return fmt.Errorf("unable to find a video or audio track")
return fmt.Errorf("the stream doesn't contain an H264 track or an AAC track")
}
c.conn.NetConn().SetWriteDeadline(time.Now().Add(c.writeTimeout))

Loading…
Cancel
Save