2023-10-29 08:11:29 CST W44D0

This commit is contained in:
aggresss
2023-10-29 08:11:29 +08:00
parent 7a0773ebf2
commit f00ecdba54
138 changed files with 2244 additions and 64 deletions

View File

@@ -1,3 +1,7 @@
// Copyright (c) 2023 QRTC. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package ffmpeg
/*
@@ -88,8 +92,18 @@ func AvGetPictureTypeChar(pictType AVPictureType) string {
}
// AvXIfNull returns x default pointer in case p is NULL.
func AvXIfNull(p, x unsafe.Pointer) unsafe.Pointer {
return C.av_x_if_null(p, x)
func AvXIfNull[T any](p, x *T) *T {
if p != nil {
return p
}
return x
}
func AvStringIfNull(p, x string) string {
if len(p) != 0 {
return p
}
return x
}
// AvIntListLengthForSize computes the length of an integer list.