mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
videodecoder: warn if frame list gets long
Decoders that get unparsed input are internally leaking nearly every incoming buffer. This checks that case.
This commit is contained in:
parent
804959ac5f
commit
ceb6585d26
1 changed files with 6 additions and 0 deletions
|
@ -2658,6 +2658,12 @@ gst_video_decoder_decode_frame (GstVideoDecoder * decoder,
|
||||||
|
|
||||||
gst_video_codec_frame_ref (frame);
|
gst_video_codec_frame_ref (frame);
|
||||||
priv->frames = g_list_append (priv->frames, frame);
|
priv->frames = g_list_append (priv->frames, frame);
|
||||||
|
|
||||||
|
if (g_list_length (priv->frames) > 10) {
|
||||||
|
GST_WARNING_OBJECT (decoder, "decoder frame list getting long: %d frames,"
|
||||||
|
"possible internal leaking?", g_list_length (priv->frames));
|
||||||
|
}
|
||||||
|
|
||||||
frame->deadline =
|
frame->deadline =
|
||||||
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
|
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
|
||||||
frame->pts);
|
frame->pts);
|
||||||
|
|
Loading…
Reference in a new issue