mirror of
https://github.com/asticode/go-astiav.git
synced 2024-05-28 13:53:18 +08:00
32 lines
518 B
Go
32 lines
518 B
Go
package astiav_test
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/asticode/go-astiav"
|
|
"github.com/asticode/go-astikit"
|
|
)
|
|
|
|
var global = struct {
|
|
closer *astikit.Closer
|
|
frame *astiav.Frame
|
|
inputFormatContext *astiav.FormatContext
|
|
inputStream1 *astiav.Stream
|
|
inputStream2 *astiav.Stream
|
|
pkt *astiav.Packet
|
|
}{
|
|
closer: astikit.NewCloser(),
|
|
}
|
|
|
|
func TestMain(m *testing.M) {
|
|
// Run
|
|
m.Run()
|
|
|
|
// Make sure to close closer
|
|
global.closer.Close()
|
|
|
|
// Exit
|
|
os.Exit(0)
|
|
}
|