Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit f4df93e

Browse files
committed
Make sure data frames are C-contiguous
1 parent 21dc1be commit f4df93e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ffmpegio_plugin_numpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def video_bytes(obj: ArrayLike) -> memoryview:
5656
:rtype: memoryview
5757
"""
5858

59-
return memoryview(obj)
59+
return memoryview(np.ascontiguousarray(obj))
6060

6161

6262
@hookimpl
@@ -69,7 +69,7 @@ def audio_bytes(obj: ArrayLike) -> memoryview:
6969
:rtype: memoryview
7070
"""
7171

72-
return memoryview(obj)
72+
return memoryview(np.ascontiguousarray(obj))
7373

7474

7575
@hookimpl

0 commit comments

Comments
 (0)