mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +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);
|
GST_WARNING_OBJECT (dec, "error: %s", dbg);
|
||||||
dec->priv->error_count += weight;
|
dec->priv->error_count += weight;
|
||||||
dec->priv->discont = TRUE;
|
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,
|
gst_element_message_full (GST_ELEMENT (dec), GST_MESSAGE_ERROR,
|
||||||
domain, code, txt, dbg, file, function, line);
|
domain, code, txt, dbg, file, function, line);
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
|
@ -3389,8 +3390,11 @@ _gst_video_decoder_error (GstVideoDecoder * dec, gint weight,
|
||||||
* @num: max tolerated errors
|
* @num: max tolerated errors
|
||||||
*
|
*
|
||||||
* Sets numbers of tolerated decoder errors, where a tolerated one is then only
|
* 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
|
* warned about, but more than tolerated will lead to fatal error. You can set
|
||||||
* is set to GST_VIDEO_DECODER_MAX_ERRORS.
|
* -1 for never returning fatal errors. Default is set to
|
||||||
|
* GST_VIDEO_DECODER_MAX_ERRORS.
|
||||||
|
*
|
||||||
|
* The '-1' option was added in 1.4
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_video_decoder_set_max_errors (GstVideoDecoder * dec, gint num)
|
gst_video_decoder_set_max_errors (GstVideoDecoder * dec, gint num)
|
||||||
|
|
Loading…
Reference in a new issue