[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
Hello,
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?
Greetings,
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()
mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_OpeningVideoDecoder,mpvdec->info->short_name,mpvdec->info->name);
+ // clear vf init error, it is no longer relevant
+ if (sh_video->vf_inited < 0)
+ sh_video->vf_inited = 0;
if(!mpvdec->init(sh_video)){
mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_VDecoderInitFailed);
sh_video->disp_w=orig_w;
More information about the MPlayer-dev-eng
mailing list