streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

commit 5eb8745e2045b6db54ac3bec6b9b0cf82529a33b
parent 28f55dfdb9da43873321ed1c13990754316e20a7
Author: Oliver Lowe <o@olowe.co>
Date:   Thu,  2 May 2024 15:50:33 +1000

internal/scte35: remove superfluous error var

Diffstat:
Minternal/scte35/avail_descriptor.go | 3+--
Minternal/scte35/dtmf_descriptor.go | 3+--
Minternal/scte35/private_command.go | 4+---
Minternal/scte35/private_descriptor.go | 4+---
Minternal/scte35/segmentation_descriptor.go | 3+--
Minternal/scte35/splice_info_section.go | 3+--
Minternal/scte35/splice_insert.go | 3+--
Minternal/scte35/splice_schedule.go | 4+---
Minternal/scte35/time_descriptor.go | 4+---
Minternal/scte35/time_signal.go | 3+--
10 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/internal/scte35/avail_descriptor.go b/internal/scte35/avail_descriptor.go @@ -81,8 +81,7 @@ func (sd *AvailDescriptor) encode() ([]byte, error) { iow.PutUint32(32, CUEIdentifier) // identifier iow.PutUint32(32, sd.ProviderAvailID) // provider_avail_id - err := iow.Flush() - return buf, err + return buf, iow.Flush() } // descriptorLength returns the descriptor_length diff --git a/internal/scte35/dtmf_descriptor.go b/internal/scte35/dtmf_descriptor.go @@ -89,8 +89,7 @@ func (sd *DTMFDescriptor) encode() ([]byte, error) { if err != nil { return buf, err } - err = iow.Flush() - return buf, err + return buf, iow.Flush() } // descriptorLength returns the descriptor_length. diff --git a/internal/scte35/private_command.go b/internal/scte35/private_command.go @@ -78,9 +78,7 @@ func (cmd *PrivateCommand) encode() ([]byte, error) { if err != nil { return buf, err } - - err = iow.Flush() - return buf, err + return buf, iow.Flush() } // commandLength returns the splice_command_length. diff --git a/internal/scte35/private_descriptor.go b/internal/scte35/private_descriptor.go @@ -77,9 +77,7 @@ func (sd *PrivateDescriptor) encode() ([]byte, error) { if err != nil { return buf, err } - err = iow.Flush() - - return buf, err + return buf, iow.Flush() } // descriptorLength returns the descriptor_length diff --git a/internal/scte35/segmentation_descriptor.go b/internal/scte35/segmentation_descriptor.go @@ -492,8 +492,7 @@ func (sd *SegmentationDescriptor) encode() ([]byte, error) { } } - err := iow.Flush() - return buf, err + return buf, iow.Flush() } // descriptorLength returns the descriptor_length diff --git a/internal/scte35/splice_info_section.go b/internal/scte35/splice_info_section.go @@ -219,8 +219,7 @@ func (sis *SpliceInfoSection) Encode() ([]byte, error) { // Re-calculate CRC_32 to ensure correctness iow.PutUint32(32, calculateCRC32(buf[:iow.Index()/8])) // CRC_32 - err := iow.Flush() - return buf, err + return buf, iow.Flush() } // EncryptedPacketFlag returns the value of encrypted_packet_flag diff --git a/internal/scte35/splice_insert.go b/internal/scte35/splice_insert.go @@ -218,8 +218,7 @@ func (cmd *SpliceInsert) encode() ([]byte, error) { iow.PutUint32(8, cmd.AvailsExpected) } - err := iow.Flush() - return buf, err + return buf, iow.Flush() } // length returns the splice_command_length. diff --git a/internal/scte35/splice_schedule.go b/internal/scte35/splice_schedule.go @@ -124,9 +124,7 @@ func (cmd *SpliceSchedule) encode() ([]byte, error) { iow.PutUint32(8, e.AvailsExpected) } - err := iow.Flush() - - return buf, err + return buf, iow.Flush() } // commandLength returns the splice_command_length diff --git a/internal/scte35/time_descriptor.go b/internal/scte35/time_descriptor.go @@ -84,9 +84,7 @@ func (sd *TimeDescriptor) encode() ([]byte, error) { iow.PutUint64(48, sd.TAISeconds) iow.PutUint32(32, sd.TAINS) iow.PutUint32(16, sd.UTCOffset) - - err := iow.Flush() - return buf, err + return buf, iow.Flush() } // descriptorLength returns descriptor_length. diff --git a/internal/scte35/time_signal.go b/internal/scte35/time_signal.go @@ -87,8 +87,7 @@ func (cmd *TimeSignal) encode() ([]byte, error) { iow.PutUint32(7, Reserved) // reserved } - err := iow.Flush() - return buf, err + return buf, iow.Flush() } // commandLength returns the splice_command_length.