mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
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.
This commit is contained in:
parent
ff0f659ca5
commit
fb842a3fdb
1 changed files with 2 additions and 0 deletions
|
@ -2225,6 +2225,7 @@ gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event)
|
||||||
GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
|
GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
|
||||||
GST_ELEMENT_ERROR (dec, STREAM, FORMAT, (NULL),
|
GST_ELEMENT_ERROR (dec, STREAM, FORMAT, (NULL),
|
||||||
("Decoder output not negotiated before GAP event."));
|
("Decoder output not negotiated before GAP event."));
|
||||||
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
needs_reconfigure = TRUE;
|
needs_reconfigure = TRUE;
|
||||||
|
@ -2273,6 +2274,7 @@ gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event)
|
||||||
ret = gst_audio_decoder_push_event (dec, event);
|
ret = gst_audio_decoder_push_event (dec, event);
|
||||||
} else {
|
} else {
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
gst_event_unref (event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue