Skip to content

Commit

Permalink
Return the actual packet count from VisibleFrameCount() for audio tracks
Browse files Browse the repository at this point in the history
The frame count for audio tracks is mostly meaningless as the API
doesn't expose audio frames, but it's the only way to check if a track
has been indexed.
  • Loading branch information
tgoyne committed Apr 19, 2014
1 parent 73e431a commit d984875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int FFMS_Track::RealFrameNumber(int Frame) const {
}

int FFMS_Track::VisibleFrameCount() const {
return RealFrameNumbers.size();
return TT == FFMS_TYPE_AUDIO ? Frames.size() : RealFrameNumbers.size();
}

void FFMS_Track::MaybeReorderFrames() {
Expand Down

0 comments on commit d984875

Please sign in to comment.