mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
opusenc: the encoder might not make use of all the bytes
This commit is contained in:
parent
b7cb6ecedb
commit
f8bb784135
1 changed files with 3 additions and 1 deletions
|
@ -588,7 +588,7 @@ gst_opus_enc_encode (GstOpusEnc * enc, GstBuffer * buf)
|
|||
GST_ERROR_OBJECT (enc, "Encoding failed: %d", outsize);
|
||||
ret = GST_FLOW_ERROR;
|
||||
goto done;
|
||||
} else if (outsize != bytes_per_packet) {
|
||||
} else if (outsize > bytes_per_packet) {
|
||||
GST_WARNING_OBJECT (enc,
|
||||
"Encoded size %d is different from %d bytes per packet", outsize,
|
||||
bytes_per_packet);
|
||||
|
@ -596,6 +596,8 @@ gst_opus_enc_encode (GstOpusEnc * enc, GstBuffer * buf)
|
|||
goto done;
|
||||
}
|
||||
|
||||
GST_BUFFER_SIZE (outbuf) = outsize;
|
||||
|
||||
ret =
|
||||
gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (enc), outbuf,
|
||||
enc->frame_samples);
|
||||
|
|
Loading…
Reference in a new issue