We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da5438e commit 0bb01e4Copy full SHA for 0bb01e4
src/AvTranscoder/file/InputFile.cpp
@@ -147,6 +147,12 @@ void InputFile::seekAtFrame( const size_t frame )
147
seek( position );
148
}
149
150
+void InputFile::seekAtTime( const double time )
151
+{
152
+ uint64_t position = time * AV_TIME_BASE;
153
+ seek( position );
154
+}
155
+
156
void InputFile::seek( uint64_t position )
157
{
158
if( (int)_formatContext.getStartTime() != AV_NOPTS_VALUE )
src/AvTranscoder/file/InputFile.hpp
@@ -49,6 +49,7 @@ class AvExport InputFile
49
* @return if next packet was read succefully
50
**/
51
void seekAtFrame( const size_t frame );
52
+ void seekAtTime( const double time );
53
54
/**
55
* @brief Activate the indicated stream
0 commit comments