Prepared some videos for future tests. Added first version of common positioning video test.

This commit is contained in:
Alexander Reshetnikov
2012-01-31 21:02:05 +00:00
parent fef90e2270
commit a41b0902f4
3 changed files with 148 additions and 5 deletions

View File

@@ -507,6 +507,9 @@ bool CvCapture_FFMPEG::reopen()
#ifndef AVSEEK_FLAG_FRAME
#define AVSEEK_FLAG_FRAME 0
#endif
ifndef AVSEEK_FLAG_ANY
#define AVSEEK_FLAG_ANY 1
#endif
bool CvCapture_FFMPEG::open( const char* _filename )
{
@@ -832,7 +835,7 @@ bool CvCapture_FFMPEG::setProperty( int property_id, double value )
}
else
{
int flags = AVSEEK_FLAG_FRAME;
int flags = AVSEEK_FLAG_ANY;
if (timestamp < ic->streams[video_stream]->cur_dts)
flags |= AVSEEK_FLAG_BACKWARD;
int ret = av_seek_frame(ic, video_stream, timestamp, flags);