From 793e42531476667db6b670d799b5baf3ebc8365f Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Fri, 25 Mar 2016 13:11:07 +0100 Subject: [PATCH] audio: Make buffer conversion work on older GStreamer installs --- mopidy/audio/tags.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mopidy/audio/tags.py b/mopidy/audio/tags.py index e29f37d8..5ae86468 100644 --- a/mopidy/audio/tags.py +++ b/mopidy/audio/tags.py @@ -70,13 +70,7 @@ def _extract_sample_data(sample): buf = sample.get_buffer() if not buf: return None - found, mapinfo = buf.map(Gst.MapFlags.READ) - if not found: - return None - try: - return bytes(mapinfo.data) - finally: - buf.unmap(mapinfo) + return buf.extract_dup(0, buf.get_size()) # TODO: split based on "stream" and "track" based conversion? i.e. handle data