Fixed a bug for live keyframe generation on non-video tracks

This commit is contained in:
Erik Zandvliet 2014-04-18 10:39:49 +02:00 committed by Thulinma
parent 3051173f3c
commit a5a8546250

View file

@ -436,11 +436,10 @@ namespace Mist {
return; return;
} }
if (myMeta.tracks[pack["trackid"].asInt()].type != "video"){ if (myMeta.tracks[pack["trackid"].asInt()].type != "video"){
if (pack["time"].asInt() - bookKeeping[trackMap[pack["trackid"].asInt()]].lastKeyTime >= 5000){ if ((pack["time"].asInt() - bookKeeping[trackMap[pack["trackid"].asInt()]].lastKeyTime) >= 5000){
pack["keyframe"] = 1LL; pack["keyframe"] = 1LL;
DEBUG_MSG(DLVL_DEVEL, "Fake keyframe added for track %d", pack["trackid"].asInt()); bookKeeping[trackMap[pack["trackid"].asInt()]].lastKeyTime = pack["time"].asInt();
} }
bookKeeping[trackMap[pack["trackid"].asInt()]].lastKeyTime = pack["time"].asInt();
} }
pack["trackid"] = trackMap[pack["trackid"].asInt()]; pack["trackid"] = trackMap[pack["trackid"].asInt()];
long long unsigned int tNum = pack["trackid"].asInt(); long long unsigned int tNum = pack["trackid"].asInt();