mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
videodecoder: allow using -1 for infinite tolerated errors
Allows using -1 to make videodecoder never post an error message after decoding errors. https://bugzilla.gnome.org/show_bug.cgi?id=711094
This commit is contained in:
parent
68afb292a2
commit
0765962fbc
1 changed files with 7 additions and 3 deletions
|
@ -3372,7 +3372,8 @@ _gst_video_decoder_error (GstVideoDecoder * dec, gint weight,
|
|||
GST_WARNING_OBJECT (dec, "error: %s", dbg);
|
||||
dec->priv->error_count += weight;
|
||||
dec->priv->discont = TRUE;
|
||||
if (dec->priv->max_errors < dec->priv->error_count) {
|
||||
if (dec->priv->max_errors >= 0 &&
|
||||
dec->priv->error_count > dec->priv->max_errors) {
|
||||
gst_element_message_full (GST_ELEMENT (dec), GST_MESSAGE_ERROR,
|
||||
domain, code, txt, dbg, file, function, line);
|
||||
return GST_FLOW_ERROR;
|
||||
|
@ -3389,8 +3390,11 @@ _gst_video_decoder_error (GstVideoDecoder * dec, gint weight,
|
|||
* @num: max tolerated errors
|
||||
*
|
||||
* Sets numbers of tolerated decoder errors, where a tolerated one is then only
|
||||
* warned about, but more than tolerated will lead to fatal error. Default
|
||||
* is set to GST_VIDEO_DECODER_MAX_ERRORS.
|
||||
* warned about, but more than tolerated will lead to fatal error. You can set
|
||||
* -1 for never returning fatal errors. Default is set to
|
||||
* GST_VIDEO_DECODER_MAX_ERRORS.
|
||||
*
|
||||
* The '-1' option was added in 1.4
|
||||
*/
|
||||
void
|
||||
gst_video_decoder_set_max_errors (GstVideoDecoder * dec, gint num)
|
||||
|
|
Loading…
Reference in a new issue