audiodecoder: set a non-zero default maximum tolerated errors

Whereas the previous default 0 was backwards compatible in that it lead
to erroring out immediately upon any error, elements that are really
ported and using the base class error macro can be assumed to intend to
improve behaviour rather than maintaining the old one.  So, make it easy
on those and any future one and tolerate some errors by default, as intended.

Fixes #666579.
This commit is contained in:
Mark Nauwelaerts 2011-12-20 12:42:18 +01:00
parent 85c10b0b24
commit c41f3cbef0
2 changed files with 11 additions and 0 deletions

View file

@ -417,6 +417,7 @@ gst_audio_decoder_reset (GstAudioDecoder * dec, gboolean full)
gst_audio_info_clear (&dec->priv->ctx.info);
memset (&dec->priv->ctx, 0, sizeof (dec->priv->ctx));
dec->priv->ctx.max_errors = GST_AUDIO_DECODER_MAX_ERRORS;
if (dec->priv->taglist) {
gst_tag_list_free (dec->priv->taglist);

View file

@ -127,6 +127,16 @@ G_STMT_START { \
GST_FUNCTION, __LINE__); \
} G_STMT_END
/**
* GST_AUDIO_DECODER_MAX_ERRORS:
*
* Default maximum number of errors tolerated before signaling error.
*
* Since: 0.10.36
*/
#define GST_AUDIO_DECODER_MAX_ERRORS 10
/**
* GstAudioDecoder:
*