diff --git a/src/media/media_decoder.cpp b/src/media/media_decoder.cpp index cadbb23002e05f3d4fed9737f064568d5f36a216..5c3d74ce2894d09604d72bd2367f08c2048e15a0 100644 --- a/src/media/media_decoder.cpp +++ b/src/media/media_decoder.cpp @@ -70,8 +70,13 @@ int MediaDecoder::openInput(const DeviceParams& params) ss << params.width << "x" << params.height; av_dict_set(&options_, "video_size", ss.str().c_str(), 0); } +#ifndef _WIN32 + // on windows, framerate setting can lead to a failure while opening device + // despite investigations, we didn't found a proper solution + // we let dshow choose the framerate, which is the highest according to our experimentations if (params.framerate) av_dict_set(&options_, "framerate", ring::to_string(params.framerate.real()).c_str(), 0); +#endif if (params.channel) av_dict_set(&options_, "channel", ring::to_string(params.channel).c_str(), 0); av_dict_set(&options_, "loop", params.loop.c_str(), 0);