From: Steven S. <sm...@us...> - 2014-10-13 23:06:21
|
Update of /cvsroot/mjpeg/mjpeg_play/y4mutils In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32204 Modified Files: qttoy4m.c Log Message: libquicktime seems to have altered behaviour - the colormodel is no longer being set automatically on open for non ffmpeg codecs. Index: qttoy4m.c =================================================================== RCS file: /cvsroot/mjpeg/mjpeg_play/y4mutils/qttoy4m.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** qttoy4m.c 25 Jun 2006 02:36:35 -0000 1.11 --- qttoy4m.c 13 Oct 2014 23:06:18 -0000 1.12 *************** *** 154,157 **** --- 154,171 ---- height = quicktime_video_height(file, vtrack); + /* + * HACK alert. + * + * libquicktime's behaviour has changed, at least for 2vuy and similar files. + * The color model in the codec used to be initialized by this point but now + * is not. This was causing all but ffmpeg based codecs to fail the is_yuv + * test below. The workaround is to call lqt_get_decoder_colormodel(), this + * completes the codec initialization but nothing else. + * + * DON'T check the status - the first call "fails" but has called the codec + * decode initialiation. A 2nd call to lqt_get_decoder_colormodel will "succeed" + */ + lqt_get_decoder_colormodel(file, vtrack); + cmodel = lqt_get_cmodel(file, vtrack); omodel = 0; *************** *** 160,168 **** mjpeg_error_exit1("Color space '%s' not Y'CbCr", lqt_colormodel_to_string(cmodel)); - if (lqt_colormodel_has_alpha(cmodel) == 1) mjpeg_error_exit1("Color space '%s' has alpha channel", ! lqt_colormodel_to_string(cmodel)); ! y4m_accept_extensions(1); --- 174,180 ---- mjpeg_error_exit1("Color space '%s' not Y'CbCr", lqt_colormodel_to_string(cmodel)); if (lqt_colormodel_has_alpha(cmodel) == 1) mjpeg_error_exit1("Color space '%s' has alpha channel", ! lqt_colormodel_to_string(cmodel)); y4m_accept_extensions(1); |