summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2016-05-14 14:41:28 +0200
committerOlivier CrĂȘte <olivier.crete@collabora.com>2016-05-20 10:54:34 -0400
commitac8ed8746d683d2d1696baacdc2ac6d7b21af31e (patch)
tree06ce83610ae452cee486734589ce665744f55bc7
parent37f05e32a931f47019be6f0d937e7172d6c90848 (diff)
downloadgstreamer-plugins-base-ac8ed8746d683d2d1696baacdc2ac6d7b21af31e.tar.gz
opusdec: Use GST_AUDIO_DECODER_ERROR
This way, the first invalid stream won't break all decoding. https://bugzilla.gnome.org/show_bug.cgi?id=766265
-rw-r--r--ext/opus/gstopusdec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c
index 5fdfd5573..501a37978 100644
--- a/ext/opus/gstopusdec.c
+++ b/ext/opus/gstopusdec.c
@@ -555,9 +555,12 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buffer)
gst_buffer_unmap (buf, &map);
if (n < 0) {
- GST_ELEMENT_ERROR (dec, STREAM, DECODE, ("Decoding error: %d", n), (NULL));
+ GstFlowReturn ret = GST_FLOW_ERROR;
+
gst_buffer_unref (outbuf);
- return GST_FLOW_ERROR;
+ GST_AUDIO_DECODER_ERROR (dec, 1, STREAM, DECODE, ("Error decoding stream"),
+ ("Decoding error (%d): %s", n, opus_strerror (n)), ret);
+ return ret;
}
GST_DEBUG_OBJECT (dec, "decoded %d samples", n);
gst_buffer_set_size (outbuf, n * 2 * dec->n_channels);