File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,5 @@ class Frame:
7
7
time_base : Fraction
8
8
is_corrupt : bool
9
9
side_data : dict [str , str ]
10
+
11
+ def make_writable (self ) -> None : ...
Original file line number Diff line number Diff line change
1
+ from av.error cimport err_check
1
2
from av.utils cimport avrational_to_fraction, to_avrational
2
3
3
4
from av.sidedata.sidedata import SideDataContainer
@@ -137,3 +138,13 @@ cdef class Frame:
137
138
if self ._side_data is None :
138
139
self ._side_data = SideDataContainer(self )
139
140
return self ._side_data
141
+
142
+ def make_writable (self ):
143
+ """
144
+ Ensures that the frame data is writable. Copy the data to new buffer if it is not.
145
+ This is a wrapper around :ffmpeg:`av_frame_make_writable`.
146
+ """
147
+ cdef int ret
148
+
149
+ ret = lib.av_frame_make_writable(self .ptr)
150
+ err_check(ret)
You can’t perform that action at this time.
0 commit comments