Added FLV::seekToTagType function for fast FLV seeking, now used in MistInFLV

This commit is contained in:
Thulinma 2017-03-02 17:26:39 +01:00
parent bea605fd18
commit 0ea100758d
3 changed files with 50 additions and 0 deletions

View file

@ -103,6 +103,12 @@ namespace Mist {
void inputFLV::getNext(bool smart) {
long long int lastBytePos = Util::ftell(inFile);
if (selectedTracks.size() == 1){
uint8_t targetTag = 0x08;
if (selectedTracks.count(1)){targetTag = 0x09;}
if (selectedTracks.count(3)){targetTag = 0x12;}
FLV::seekToTagType(inFile, targetTag);
}
while (!feof(inFile) && !FLV::Parse_Error){
if (tmpTag.FileLoader(inFile)){
if ( !selectedTracks.count(tmpTag.getTrackID())){