github.com/bluenviron/mediacommon@v1.9.3/pkg/codecs/h265/is_random_access_test.go (about)

     1  package h265
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestIsRandomAccess(t *testing.T) {
    10  	u := [][]byte{{byte(NALUType_IDR_W_RADL) << 1}}
    11  	require.Equal(t, true, IsRandomAccess(u))
    12  
    13  	u = [][]byte{{byte(NALUType_TRAIL_N) << 1}}
    14  	require.Equal(t, false, IsRandomAccess(u))
    15  }