Commit c6a40caf authored by Laurent Aimar's avatar Laurent Aimar

Handle errors when no filter can be found to adapt from the decoder format to the display one.

Backport from 174ded88c536ffc9f9eeb8de96e29cf5e9c9a889 in master
parent fe44129d
......@@ -414,11 +414,7 @@ static void VoutDisplayCreateRender(vout_display_t *vd)
break;
}
if (!filter)
{
msg_Err(vd, "VoutDisplayCreateRender FAILED");
/* TODO */
assert(0);
}
msg_Err(vd, "Failed to adapt decoder format to display");
}
static void VoutDisplayDestroyRender(vout_display_t *vd)
......@@ -993,6 +989,10 @@ picture_t *vout_FilterDisplay(vout_display_t *vd, picture_t *picture)
vout_display_owner_sys_t *osys = vd->owner.sys;
assert(osys->filters);
if (filter_chain_GetLength(osys->filters) <= 0) {
picture_Release(picture);
return NULL;
}
return filter_chain_VideoFilter(osys->filters, picture);
}
......
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