audio/videodecoder: Initialize max_errors in instance_init()
authorSebastian Dröge <sebastian@centricular.com>
Tue, 20 Oct 2020 09:44:21 +0000 (12:44 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 20 Oct 2020 09:46:07 +0000 (12:46 +0300)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/882>

gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/video/gstvideodecoder.c

index 8da5cea..c8e4a0c 100644 (file)
@@ -497,6 +497,7 @@ gst_audio_decoder_init (GstAudioDecoder * dec, GstAudioDecoderClass * klass)
   dec->priv->plc = DEFAULT_PLC;
   dec->priv->drainable = DEFAULT_DRAINABLE;
   dec->priv->needs_format = DEFAULT_NEEDS_FORMAT;
+  dec->priv->ctx.max_errors = GST_AUDIO_DECODER_MAX_ERRORS;
 
   /* init state */
   dec->priv->ctx.min_latency = 0;
index a4dbc74..a1942b4 100644 (file)
@@ -699,6 +699,7 @@ gst_video_decoder_init (GstVideoDecoder * decoder, GstVideoDecoderClass * klass)
 
   /* properties */
   decoder->priv->do_qos = DEFAULT_QOS;
+  decoder->priv->max_errors = GST_VIDEO_DECODER_MAX_ERRORS;
 
   decoder->priv->min_latency = 0;
   decoder->priv->max_latency = 0;