Fixed audio key setting
This commit is contained in:
parent
5a6eaa30ac
commit
2f477a4ef9
3 changed files with 2 additions and 3 deletions
|
@ -93,6 +93,7 @@ static inline void show_stackframe(){}
|
||||||
#define SHM_DATASIZE 20
|
#define SHM_DATASIZE 20
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define AUDIO_KEY_INTERVAL 5000 ///< This define controls the keyframe interval for non-video tracks, such as audio and metadata tracks.
|
||||||
|
|
||||||
#ifndef STATS_DELAY
|
#ifndef STATS_DELAY
|
||||||
#define STATS_DELAY 15
|
#define STATS_DELAY 15
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#define AUDIO_KEY_INTERVAL 5000 ///< This define controls the keyframe interval for non-video tracks, such as audio and metadata tracks.
|
|
||||||
|
|
||||||
namespace DTSC {
|
namespace DTSC {
|
||||||
/// Default constructor for packets - sets a null pointer and invalid packet.
|
/// Default constructor for packets - sets a null pointer and invalid packet.
|
||||||
Packet::Packet() {
|
Packet::Packet() {
|
||||||
|
|
|
@ -453,7 +453,7 @@ namespace Mist {
|
||||||
isKeyframe = true;
|
isKeyframe = true;
|
||||||
} else {
|
} else {
|
||||||
unsigned long lastKey = pagesByTrack[tid].rbegin()->second.lastKeyTime;
|
unsigned long lastKey = pagesByTrack[tid].rbegin()->second.lastKeyTime;
|
||||||
if (packet.getTime() - lastKey > 5000) {
|
if (packet.getTime() - lastKey > AUDIO_KEY_INTERVAL) {
|
||||||
isKeyframe = true;
|
isKeyframe = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue