[vlc-commits] Handle errors when no filter can be found to adapt from the decoder format to the display one .
Laurent Aimar
git at videolan.org
Sat Feb 12 23:16:58 CET 2011
vlc/vlc-1.1 | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 12 23:15:46 2011 +0100| [c6a40caff1298fb98fe8c5213b11093dbb9458ff] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=c6a40caff1298fb98fe8c5213b11093dbb9458ff
---
src/video_output/display.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 99f548a..858fefb 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -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);
}
More information about the vlc-commits
mailing list