Skip to content
Snippets Groups Projects
Commit 7de79eb7 authored by Edric Milaret's avatar Edric Milaret Committed by Eloi Bail
Browse files

encoder: don't try to provide framerate to ffmpeg on win32

- dshow provide min/max value that don't always work. No pattern
have been observed as to why...
- ffmpeg chooses the highest value it can when we don't provide it.

Change-Id: I8d8b0993ded6d474f3ad9c741df7fd14fb61021b
Tuleap: #132
parent de1d070a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment