Skip to content

Commit a8ecc9f

Browse files
fix: resolve remaining lint issues and exclude .claude folder
- Fix gosimple S1009: remove unnecessary nil checks before len() - Fix errcheck: handle avcodec.PacketRef error - Add .claude/** to git-copy exclusions
1 parent 85c03db commit a8ecc9f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

decoder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func NewDecoderWithOptions(path string, opts *DecoderOptions) (*Decoder, error)
239239

240240
// Stream selection.
241241
wantVideo, wantAudio := true, true
242-
if opts != nil && len(opts.Streams) > 0 {
242+
if len(opts.Streams) > 0 {
243243
wantVideo, wantAudio = false, false
244244
for _, mt := range opts.Streams {
245245
switch mt {

remuxer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func NewRemuxer(outputPath string, decoder *Decoder, cfg *RemuxerConfig) (*Remux
7272

7373
// Determine which streams to copy
7474
var streamsToCopy []int
75-
if cfg != nil && len(cfg.InputStreams) > 0 {
75+
if len(cfg.InputStreams) > 0 {
7676
streamsToCopy = cfg.InputStreams
7777
} else {
7878
// Copy all streams
@@ -210,7 +210,7 @@ func (r *Remuxer) WritePacket(pkt avcodec.Packet, inputStreamIdx int) error {
210210
}
211211

212212
// Reference the packet (don't copy data, just increment refcount)
213-
avcodec.PacketRef(r.packet, pkt)
213+
_ = avcodec.PacketRef(r.packet, pkt)
214214

215215
// Set output stream index
216216
avcodec.SetPacketStreamIndex(r.packet, int32(outputIdx))

0 commit comments

Comments
 (0)