mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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
This commit is contained in:
parent
8fc42f12f0
commit
1a700c3ae6
1 changed files with 5 additions and 2 deletions
|
@ -554,9 +554,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);
|
||||
|
|
Loading…
Reference in a new issue