Probably bugfix for the live audio problem

This commit is contained in:
Erik Zandvliet 2014-04-17 16:21:19 +02:00 committed by Thulinma
parent f00ae42c32
commit 3051173f3c
2 changed files with 9 additions and 1 deletions

View file

@ -435,6 +435,13 @@ namespace Mist {
//declined track;
return;
}
if (myMeta.tracks[pack["trackid"].asInt()].type != "video"){
if (pack["time"].asInt() - bookKeeping[trackMap[pack["trackid"].asInt()]].lastKeyTime >= 5000){
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();
}
pack["trackid"] = trackMap[pack["trackid"].asInt()];
long long unsigned int tNum = pack["trackid"].asInt();
if (!bookKeeping.count(tNum)){

View file

@ -6,13 +6,14 @@
namespace Mist {
struct DTSCPageData {
DTSCPageData() : pageNum(0), keyNum(0), partNum(0), dataSize(0), curOffset(0), firstTime(0){}
DTSCPageData() : pageNum(0), keyNum(0), partNum(0), dataSize(0), curOffset(0), firstTime(0), lastKeyTime(-5000){}
int pageNum;///<The current page number
int keyNum;///<The number of keyframes in this page.
int partNum;///<The number of parts in this page.
unsigned long long int dataSize;///<The full size this page should be.
unsigned long long int curOffset;///<The current write offset in the page.
unsigned long long int firstTime;///<The first timestamp of the page.
long long int lastKeyTime;///<The time of the last keyframe of the page.
};
class OutRTMP : public Output {