vorbisenc: do not map input buffer in WRITE mode

This commit is contained in:
Mathieu Duponchelle 2018-04-11 22:56:34 +02:00
parent ac8215b9fe
commit 44ea6f4c06

View file

@ -907,7 +907,7 @@ gst_vorbis_enc_handle_frame (GstAudioEncoder * enc, GstBuffer * buffer)
if (!buffer)
return gst_vorbis_enc_clear (vorbisenc);
gst_buffer_map (buffer, &map, GST_MAP_WRITE);
gst_buffer_map (buffer, &map, GST_MAP_READ);
/* data to encode */
size = map.size / (vorbisenc->channels * sizeof (float));