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:
David Schleef 2013-02-11 11:54:46 -08:00
parent 804959ac5f
commit ceb6585d26

View file

@ -2658,6 +2658,12 @@ gst_video_decoder_decode_frame (GstVideoDecoder * decoder,
gst_video_codec_frame_ref (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 =
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
frame->pts);