From 0e70d4a943b46b14d8a470e1f5d201c9110ae9f2 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 7 Mar 2016 22:28:21 +0100 Subject: cannot memcpy from a std::deque --- src/dabplus-enc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp index c22cb9d..3813041 100644 --- a/src/dabplus-enc.cpp +++ b/src/dabplus-enc.cpp @@ -1146,8 +1146,12 @@ int main(int argc, char *argv[]) zmq_frame_header->audiolevel_left = peak_left; zmq_frame_header->audiolevel_right = peak_right; - memcpy(ZMQ_FRAME_DATA(zmq_frame_header), - &toolame_output_buffer[0], 3 * bitrate); + uint8_t *encoded_frame = ZMQ_FRAME_DATA(zmq_frame_header); + + // no memcpy for std::deque + for (size_t i = 0; i < 3*bitrate; i++) { + encoded_frame[i] = toolame_output_buffer[i]; + } zmq_sock.send(&zmqframebuf[0], ZMQ_FRAME_SIZE(zmq_frame_header), ZMQ_DONTWAIT); -- cgit v1.2.3