Skip to content
systemcoding.dev

Snippets

Short posts that solve one thing: the code, the output we got, and why it works.

Media

Open an input with avformat_open_input

Open a media file in C with avformat_open_input from libavformat 61 (FFmpeg 7.1), check the negative error code, and release it with avformat_close_input.

2 min read
Kernels

Start a kernel thread with kthread_run

Create and wake a kernel thread in one call with kthread_run(), check the ERR_PTR return, and give it a name that shows up in ps on Linux 6.x.

1 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.