How to properly configure ffmpeg for the Go wrapper

I've been trying out the wrapper for ffmpeg written in Go (imkira/go-libav) and tried to follow the example, but after a successful build I've got an error that the decoder can't be found.
This is the part of code where the error occurs:

if ctx.decStream = firstStream(ctx.decFmt); ctx.decStream == nil {
  log.Fatalf("Couldn't find a video stream.")
}

codecCtx := ctx.decStream.CodecContext()
codec := avcodec.FindDecoderByID(codecCtx.CodecID())
if codec == nil {
  log.Fatalf("Could not find decoder: %v\n", codecCtx.CodecID())
}

The first_stream function:

func firstStream(fmtCtx *avformat.Context) *avformat.Stream {
  for _, stream := range fmtCtx.Streams() {
    switch stream.CodecContext().CodecType() {
      case avutil.MediaTypeVideo:
        return stream
    }
  }
  return nil
}

That's the same as in the example, which also has the same problem. I assume it isn't code-based but I can't figure it out. I tried registering all formats but actually it happens in the init() function.
I'm using Manjaro Linux 19.0.0 and have FFmpeg 3.3.9 installed from source.