File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ convert compressed audio files to WAV files.
70
70
Version History
71
71
---------------
72
72
73
+ 2.1.9
74
+ Work correctly with GStreamer 1.18 and later (thanks to @ssssam)
75
+
73
76
2.1.8
74
77
Fix an unhandled ``OSError `` when FFmpeg is not installed.
75
78
Original file line number Diff line number Diff line change @@ -321,7 +321,14 @@ def _new_sample(self, sink):
321
321
mem = buf .get_all_memory ()
322
322
success , info = mem .map (Gst .MapFlags .READ )
323
323
if success :
324
- data = info .data
324
+ if isinstance (info .data , memoryview ):
325
+ # We need to copy the data as the memoryview is released
326
+ # when we call mem.unmap()
327
+ data = bytes (info .data )
328
+ else :
329
+ # GStreamer Python bindings <= 1.16 return a copy of the
330
+ # data as bytes()
331
+ data = info .data
325
332
mem .unmap (info )
326
333
self .queue .put (data )
327
334
else :
You can’t perform that action at this time.
0 commit comments