Skip to content

Commit 4866e54

Browse files
author
Clement Champetier
committed
InputStream: getDuration from the stream
Instead of the duration from the format.
1 parent cdb849f commit 4866e54

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/AvTranscoder/stream/InputStream.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ AVMediaType InputStream::getStreamType() const
113113

114114
double InputStream::getDuration() const
115115
{
116-
// @todo: return stream duration, depending on its type (instead of format duration)
117-
return _inputFile->getProperties().getDuration();
116+
return _inputFile->getProperties().getStreamPropertiesWithIndex( _streamIndex ).getDuration();
118117
}
119118

120119
void InputStream::addPacket( AVPacket& packet )

0 commit comments

Comments
 (0)