[MPlayer-dev-eng] [PATCH] reset vf error before codec init

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Feb 25 20:48:03 CET 2007

when multiple codecs are tried (mpegpes and mpeg12 was the problematic
case here), init can incorrectly fail with "FATAL: Could not initialize
video filters (-vf) or video output (-vo).".
The reason is that the first codec did fail due to some filter problems,
while the second one did not yet config the vo e.g. because it must wait
for a keyframe before it can do that.
Is attached patch okay?

Reimar Döffinger
-------------- next part --------------
Index: libmpcodecs/dec_video.c
--- libmpcodecs/dec_video.c	(revision 22339)
+++ libmpcodecs/dec_video.c	(working copy)
@@ -257,6 +257,9 @@
 	// init()
+	// clear vf init error, it is no longer relevant
+	if (sh_video->vf_inited < 0)
+		sh_video->vf_inited = 0;

More information about the MPlayer-dev-eng mailing list