round A/V offset to video-frames.

This commit is contained in:
Robin Gareus 2014-07-02 20:26:13 +02:00
parent 3c2c048f40
commit 77e716943f
3 changed files with 10 additions and 6 deletions

View file

@ -348,6 +348,12 @@ TranscodeFfmpeg::encode (std::string outfile, std::string inf_a, std::string inf
argp[a++] = strdup("-metadata");
argp[a++] = format_metadata(it->first.c_str(), it->second.c_str());
}
if (m_fps > 0) {
m_lead_in = rint (m_lead_in * m_fps) / m_fps;
m_lead_out = rint (m_lead_out * m_fps) / m_fps;
}
if (m_lead_in != 0 && m_lead_out != 0) {
std::ostringstream osstream;
argp[a++] = strdup("-vf");