changeset 19387:969cc3590099

Do not call VFCTRL_FLUSH_FRAMES when the filter chain was never configured, since that will cause crashes (try with e.g. -ss 99999999999999).
author reimar
date Mon, 14 Aug 2006 14:24:17 +0000
parents 01853e915882
children 6ad0d5247fee
files mencoder.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Mon Aug 14 14:13:53 2006 +0000
+++ b/mencoder.c	Mon Aug 14 14:24:17 2006 +0000
@@ -1543,6 +1543,9 @@
 
 /* Emit the remaining frames in the video system */
 /*TODO emit frmaes delayed by decoder lag*/
+if (!((vf_instance_t *)sh_video->vfilter)->fmt.have_configured) {
+	mp_msg(MSGT_MENCODER, MSGL_WARN, "\nFilters have not been configured! Empty file?\n");
+} else
 if(sh_video && sh_video->vfilter){
 	mp_msg(MSGT_MENCODER, MSGL_INFO, "\nFlushing video frames\n");
 	((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter,