Skip to content

audiodecoder: Move max_errors out of GstAudioDecoderContext

Currently max-errors gets set during init to default or via property. However, if a decoder element calls gst_audio_decoder_reset with 'full' argument set to TRUE, it would result in all the fields of context being zeroed with memset. This effectively results in max-errors getting a value of 0 overriding the default or user requested value set during init.

This would result in calls to GST_AUDIO_DECODER_ERROR which track error counts and allow max-errors, to be ineffective.

To fix this move max-errors out of GstAudioDecoderContext, as changes to context should not affect this. The error_count is anyways also in GstAudioDecoderPrivate and not in context.

Edited by Sanchayan Maity

Merge request reports

Loading