From 0633bef05dd19a4cf18188309e504ab65af48d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 11 Dec 2020 16:33:39 -0500 Subject: [PATCH] ldacenc: Emit message on errors Part-of: --- ext/ldac/gstldacenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/ldac/gstldacenc.c b/ext/ldac/gstldacenc.c index ec4c04fb23..9ca2ef8fbf 100644 --- a/ext/ldac/gstldacenc.c +++ b/ext/ldac/gstldacenc.c @@ -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; }