Commit 174ded88 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.

parent 4dae8e1b
...@@ -424,11 +424,7 @@ static void VoutDisplayCreateRender(vout_display_t *vd) ...@@ -424,11 +424,7 @@ static void VoutDisplayCreateRender(vout_display_t *vd)
break; break;
} }
if (!filter) if (!filter)
{ msg_Err(vd, "Failed to adapt decoder format to display");
msg_Err(vd, "VoutDisplayCreateRender FAILED");
/* TODO */
assert(0);
}
} }
static void VoutDisplayDestroyRender(vout_display_t *vd) static void VoutDisplayDestroyRender(vout_display_t *vd)
...@@ -1087,6 +1083,10 @@ picture_t *vout_FilterDisplay(vout_display_t *vd, picture_t *picture) ...@@ -1087,6 +1083,10 @@ picture_t *vout_FilterDisplay(vout_display_t *vd, picture_t *picture)
vout_display_owner_sys_t *osys = vd->owner.sys; vout_display_owner_sys_t *osys = vd->owner.sys;
assert(osys->filters); assert(osys->filters);
if (filter_chain_GetLength(osys->filters) <= 0) {
picture_Release(picture);
return NULL;
}
return filter_chain_VideoFilter(osys->filters, picture); return filter_chain_VideoFilter(osys->filters, picture);
} }
......
...@@ -1020,6 +1020,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) ...@@ -1020,6 +1020,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
} }
if (!do_dr_spu && subpic) if (!do_dr_spu && subpic)
subpicture_Delete(subpic); subpicture_Delete(subpic);
if (!sys->display.filtered)
return VLC_EGENERIC;
} }
vout_chrono_Stop(&vout->p->render); vout_chrono_Stop(&vout->p->render);
......
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