ldacenc: Emit message on errors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1875>
This commit is contained in:
Olivier Crête 2020-12-11 16:33:39 -05:00 committed by GStreamer Marge Bot
parent e041ff697d
commit 0633bef05d

View file

@ -438,8 +438,8 @@ gst_ldac_enc_handle_frame (GstAudioEncoder * audio_enc, GstBuffer * buffer)
ret = ldacBT_encode (enc->ldac, (void *) inp_data, &encoded,
(guint8 *) out_data, &written, &ldac_frame_num);
if (ret < 0) {
GST_ERROR_OBJECT (enc, "encoding error, ret = %d written = %d",
ret, ldac_frame_num);
GST_ELEMENT_ERROR (enc, STREAM, ENCODE, (NULL),
("encoding error, ret = %d written = %d", ret, ldac_frame_num));
goto encoding_error;
} else {
to_encode -= encoded;
@ -474,7 +474,8 @@ no_buffer:
{
gst_buffer_unmap (buffer, &in_map);
GST_ERROR_OBJECT (enc, "could not allocate output buffer");
GST_ELEMENT_ERROR (enc, STREAM, FAILED, (NULL),
("could not allocate output buffer"));
return GST_FLOW_ERROR;
}