The latter does not require a full AVCodecContext and still provides all the functionality needed here.
Attach a file by drag & drop or click to upload