Commit fb842a3f authored by Doug Nazar's avatar Doug Nazar

audiodecoder: Fix leak on failed audio gaps

If we fail to process the gap event we need to unref the event or
we end up with a leak.
parent ff0f659c
Pipeline #44916 passed with stages
in 54 minutes and 2 seconds
......@@ -2225,6 +2225,7 @@ gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event)
GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
GST_ELEMENT_ERROR (dec, STREAM, FORMAT, (NULL),
("Decoder output not negotiated before GAP event."));
gst_event_unref (event);
return FALSE;
}
needs_reconfigure = TRUE;
......@@ -2273,6 +2274,7 @@ gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event)
ret = gst_audio_decoder_push_event (dec, event);
} else {
ret = FALSE;
gst_event_unref (event);
}
}
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment