[MPlayer-dev-eng] [PATCH] mencoder crash on empty file

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Aug 8 17:45:14 CEST 2006


Hello,
when encoding an empty file (e.g. via -ss 99999999999999) mencoder
currently crashes at least with -ovc lavc.
The reason is that control with VFCTRL_FLUSH_FRAMES is called although
config has not been executed.
Attached patch would be one way to fix. Is it okay?
Another way would probably be to implement vo_config_count properly for
mencoder, too.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: mencoder.c
===================================================================
--- mencoder.c	(revision 19360)
+++ mencoder.c	(working copy)
@@ -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,


More information about the MPlayer-dev-eng mailing list