Skip to content

Commit

Permalink
[avi/demux] Remove fraps empty frames (hack)
Browse files Browse the repository at this point in the history
  • Loading branch information
mean committed Oct 8, 2017
1 parent bb60bf0 commit 6da0b64
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions avidemux_plugins/ADM_demuxers/OpenDml/ADM_openDML.cpp
Expand Up @@ -544,9 +544,14 @@ bool OpenDMLHeader::removeEmptyFrames(void)

odmlIndex *nwIdx=new odmlIndex[_videostream.dwLength];
int index=0;
bool isFraps=fourCC::check(_videostream.fccHandler,(uint8_t *)"FPS1");

for(int i=0;i<_videostream.dwLength;i++)
{
if(_idx[i].size)
bool skip=false;
if(!_idx[i].size) skip=true;
if(isFraps && _idx[i].size==8) skip=true;
if(!skip)
{
nwIdx[index++]=_idx[i];
}
Expand All @@ -559,7 +564,7 @@ bool OpenDMLHeader::removeEmptyFrames(void)
}
int delta=_videostream.dwLength-index;

printf("[openDml] Removed %d empty frames\n",(int)delta);
printf("[openDml] Removed %d empty frames, new total is %d\n",(int)delta,(int)index);
_mainaviheader.dwTotalFrames=_videostream.dwLength=index;
delete [] _idx;
_idx=nwIdx;
Expand Down

0 comments on commit 6da0b64

Please sign in to comment.