validate:plugins: Handle the case where we have a pipelines with only 1 frame

This commit is contained in:
Thibault Saunier 2017-01-30 22:20:11 +00:00
parent 4881013d66
commit 7917654eef

View file

@ -521,6 +521,15 @@ _find_frame (GstValidateSsim * self, GArray * frames, GstClockTime ts,
guint i;
Frame *lframe = &g_array_index (frames, Frame, 0);
if (frames->len == 1) {
Frame *iframe = &g_array_index (frames, Frame, 0);
if (iframe->ts == ts)
return iframe;
return NULL;
}
for (i = 1; i < frames->len; i++) {
Frame *iframe = &g_array_index (frames, Frame, i);