Avoid reading pictures

After reading the video, use it to read the image, and the image does not display
This commit is contained in:
slllllala 2019-11-07 14:42:39 +08:00 committed by GitHub
parent 070e55e8e0
commit 04931ddb2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,6 +135,9 @@ public:
virtual ReadResult readImage(const std::string & filename, const osgDB::ReaderWriter::Options* options) const
{
const std::string ext = osgDB::getLowerCaseFileExtension(filename);
const std::string pro = osgDB::getServerProtocol(filename);
if (!acceptsExtension(ext) && !acceptsProtocol(pro)) return ReadResult::FILE_NOT_HANDLED;
if (ext=="ffmpeg") return readImage(osgDB::getNameLessExtension(filename),options);
osg::ref_ptr<osgFFmpeg::FFmpegParameters> parameters(new osgFFmpeg::FFmpegParameters);