Skip to content

Commit 53830c0

Browse files
committed
[avisynth_cffi] Fix make_writable
1 parent ee2ad80 commit 53830c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

avisynth_cffi.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,8 +1385,11 @@ def new_video_frame_a(self, vi, align=avs.AVS_FRAME_ALIGN):
13851385
# align should be at least 16
13861386
return avs.avs_new_video_frame_a(self.cdata, vi, align)
13871387

1388-
def make_writable(self, video_frame_p): # TODO
1389-
return avs.avs_make_writable(self.cdata, video_frame_p)
1388+
def make_writable(self, video_frame):
1389+
video_frame_p = ffi.new('AVS_VideoFrame * *', video_frame.cdata)
1390+
ret = avs.avs_make_writable(self.cdata, video_frame_p)
1391+
video_frame.cdata = video_frame_p[0]
1392+
return ret
13901393

13911394
def bit_blt(self, dstp, dst_pitch, srcp, src_pitch, row_size, height):
13921395
avs.avs_bit_blt(self.cdata, dstp, dst_pitch, srcp, src_pitch, row_size, height)

0 commit comments

Comments
 (0)