mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
opusenc: the encoder might not make use of all the bytes
This commit is contained in:
parent
ccc04a1529
commit
d2aba01428
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);
|
GST_ERROR_OBJECT (enc, "Encoding failed: %d", outsize);
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
} else if (outsize != bytes_per_packet) {
|
} else if (outsize > bytes_per_packet) {
|
||||||
GST_WARNING_OBJECT (enc,
|
GST_WARNING_OBJECT (enc,
|
||||||
"Encoded size %d is different from %d bytes per packet", outsize,
|
"Encoded size %d is different from %d bytes per packet", outsize,
|
||||||
bytes_per_packet);
|
bytes_per_packet);
|
||||||
|
@ -596,6 +596,8 @@ gst_opus_enc_encode (GstOpusEnc * enc, GstBuffer * buf)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_BUFFER_SIZE (outbuf) = outsize;
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (enc), outbuf,
|
gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (enc), outbuf,
|
||||||
enc->frame_samples);
|
enc->frame_samples);
|
||||||
|
|
Loading…
Reference in a new issue