diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-03-07 22:28:21 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-03-07 22:28:21 +0100 |
commit | 0e70d4a943b46b14d8a470e1f5d201c9110ae9f2 (patch) | |
tree | cda5356f053a0ffdcd6ba7dd2b85916991b860d9 /src | |
parent | ec7dba8b56dbe654c32adf39be3749d28cad79bd (diff) | |
download | ODR-AudioEnc-0e70d4a943b46b14d8a470e1f5d201c9110ae9f2.tar.gz ODR-AudioEnc-0e70d4a943b46b14d8a470e1f5d201c9110ae9f2.tar.bz2 ODR-AudioEnc-0e70d4a943b46b14d8a470e1f5d201c9110ae9f2.zip |
cannot memcpy from a std::deque
Diffstat (limited to 'src')
-rw-r--r-- | src/dabplus-enc.cpp | 8 |
1 files 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); |