Added links to C doc

This commit is contained in:
Quentin Renard
2024-11-13 18:12:00 +01:00
parent 1841ad55fe
commit b15d5d0e04
80 changed files with 539 additions and 115 deletions

View File

@@ -4,9 +4,9 @@ package astiav
//#include <errno.h>
import "C"
// https://ffmpeg.org/doxygen/7.0/group__lavu__error.html#ga586e134e9dad8f57a218b2cd8734b601
type Error int
// https://github.com/FFmpeg/FFmpeg/blob/n5.0/libavutil/error.h#L51
const (
ErrBsfNotFound = Error(C.AVERROR_BSF_NOT_FOUND)
ErrBufferTooSmall = Error(C.AVERROR_BUFFER_TOO_SMALL)
@@ -51,6 +51,7 @@ func newError(ret C.int) error {
return Error(i)
}
// https://ffmpeg.org/doxygen/7.0/group__lavu__error.html#ga5792b4a2d18d7d9cb0efbcfc335dce24
func (e Error) Error() string {
s, _ := stringFromC(255, func(buf *C.char, size C.size_t) error {
return newError(C.av_strerror(C.int(e), buf, size))