Closed ccaum closed 4 years ago
Hi, @ccaum. Yes, looks good, but i found two problems:
cfilename
type from *_Ctype_char
video-to-image
and it fails with SIGSEGV
github.com/3d0c/gmf.(*FmtCtx).OpenInputWithOption(0xc00009c270, 0x7fff5fbff9ee, 0x7, 0x0, 0x0, 0x0)
/Users/alex/3d0c/gmf/format_go112.go:222 +0x6b
Sorry for the delay. Thanks for catching those issues. All fixed.
I added small fix for format_go112.go. Now everything looks good. Thank you.
Previous to this commit, no options could be given to the FmtCtx.OpenInput function. For input formats like video4linux2, that means options to specify input format (rawvideo, h264, etc.) or framerate were impossible.
This commit introduces a new FmtCtx.OpenInputWithOption function that takes a Option parameter. To maintain backwards compatibility, the OpenInput function now just calls the OpenInputWithOption function, but passes a nil value for the Option parameter.
Example usage: