Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug example/version #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions avformat/avformat.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,16 @@ func AvAddIndexEntry(st *Stream, pos, t, int64, s, d, f int) int {

//Split a URL string into components.
func AvUrlSplit(proto_size, authorization_size, hostname_size int, pp *int, path_size int, url string) (proto, authorization, hostname, path string) {
Cproto := (*C.char)(C.malloc(C.sizeof_char * C.ulong(proto_size)))
Cproto := (*C.char)(C.malloc(C.sizeof_char * C.ulonglong(proto_size)))
defer C.free(unsafe.Pointer(Cproto))

Cauthorization := (*C.char)(C.malloc(C.sizeof_char * C.ulong(authorization_size)))
Cauthorization := (*C.char)(C.malloc(C.sizeof_char * C.ulonglong(authorization_size)))
defer C.free(unsafe.Pointer(Cauthorization))

Chostname := (*C.char)(C.malloc(C.sizeof_char * C.ulong(hostname_size)))
Chostname := (*C.char)(C.malloc(C.sizeof_char * C.ulonglong(hostname_size)))
defer C.free(unsafe.Pointer(Chostname))

Cpath := (*C.char)(C.malloc(C.sizeof_char * C.ulong(path_size)))
Cpath := (*C.char)(C.malloc(C.sizeof_char * C.ulonglong(path_size)))
defer C.free(unsafe.Pointer(Cpath))

Curl := C.CString(url)
Expand All @@ -297,7 +297,7 @@ func AvUrlSplit(proto_size, authorization_size, hostname_size int, pp *int, path
//int av_get_frame_filename (char *buf, int buf_size, const char *path, int number)
//Return in 'buf' the path with 'd' replaced by a number.
func AvGetFrameFilename(buf_size int, path string, number int) (int, string) {
Cbuf := (*C.char)(C.malloc(C.sizeof_char * C.ulong(buf_size)))
Cbuf := (*C.char)(C.malloc(C.sizeof_char * C.ulonglong(buf_size)))
defer C.free(unsafe.Pointer(Cbuf))

Cpath := C.CString(path)
Expand All @@ -318,7 +318,7 @@ func AvFilenameNumberTest(filename string) int {

//Generate an SDP for an RTP session.
func AvSdpCreate(ac **Context, n_files int, buf_size int) (int, string) {
Cbuf := (*C.char)(C.malloc(C.sizeof_char * C.ulong(buf_size)))
Cbuf := (*C.char)(C.malloc(C.sizeof_char * C.ulonglong(buf_size)))
defer C.free(unsafe.Pointer(Cbuf))

ret := int(C.av_sdp_create((**C.struct_AVFormatContext)(unsafe.Pointer(ac)), C.int(n_files), Cbuf, C.int(buf_size)))
Expand Down