mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-19 01:49:47 -08:00
simplify code (#5314)
This commit is contained in:
parent
b9adbc3e09
commit
a148f5a546
2 changed files with 2 additions and 12 deletions
|
|
@ -294,13 +294,8 @@ func (t *h264) ProcessRTPPacket( //nolint:dupl
|
|||
u.Payload = t.remuxAccessUnit(au)
|
||||
}
|
||||
|
||||
// route packet as is
|
||||
if t.encoder == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// encode into RTP
|
||||
if !u.NilPayload() {
|
||||
if t.encoder != nil && !u.NilPayload() {
|
||||
pkts, err := t.encoder.Encode(u.Payload.(unit.PayloadH264))
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -326,13 +326,8 @@ func (t *h265) ProcessRTPPacket( //nolint:dupl
|
|||
u.Payload = t.remuxAccessUnit(au)
|
||||
}
|
||||
|
||||
// route packet as is
|
||||
if t.encoder == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// encode into RTP
|
||||
if !u.NilPayload() {
|
||||
if t.encoder != nil && !u.NilPayload() {
|
||||
pkts, err := t.encoder.Encode(u.Payload.(unit.PayloadH265))
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue