stash/pkg/ffmpeg
SmallCoccinelle 8b7720e3bf
Enable the appendAssign lint check (#1865)
* Make copies of buffers

Avoid reusing one of the incoming arrays as a append extension, and
make a copy of the data. It's cleaner in the long run and possibly
easier for the GC to maintain.

* Avoid appendAssign problems in tag code

Reuse the existing slice when appending.

* Fix appendAssign in encoder_scene_preview_chunk

Appending and creating a new slice is somewhat unintuitive since the
underlying slice might be extended to satisfy the new capacity. This
sometimes leads to faulty logic.

Rewrite the code so it reuses `args` for all appending, and builds one
array clearly in the code. It follows the general style of the function
where `args` is being built in small incremental batches and avoids
the introduction of new names.

* Enable the appendAssign check

This makes us pass all gocritic warnings.

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-10-20 16:34:19 +11:00
..
downloader.go Toward better context handling (#1835) 2021-10-14 15:32:41 +11:00
encoder.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
encoder_marker.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
encoder_scene_preview_chunk.go Enable the appendAssign lint check (#1865) 2021-10-20 16:34:19 +11:00
encoder_screenshot.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
encoder_sprite_screenshot.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
encoder_transcode.go Fixups + enable the commentFormatting linter (#1866) 2021-10-20 16:10:46 +11:00
ffprobe.go Fixups + enable the commentFormatting linter (#1866) 2021-10-20 16:10:46 +11:00
hls.go Remove unused (#1709) 2021-09-09 14:10:08 +10:00
image.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
media_detection.go Fixups + enable the commentFormatting linter (#1866) 2021-10-20 16:10:46 +11:00
regex.go Configuration 2019-04-11 10:55:58 -07:00
stream.go Scan refactor (#1816) 2021-10-15 10:39:48 +11:00
types.go Parse title, details, date from file metadata 2019-08-16 08:47:35 +10:00