Merge pull request #1828 from SpecLad:merge-2.4

This commit is contained in:
Roman Donchenko
2013-11-20 16:08:52 +04:00
committed by OpenCV Buildbot
110 changed files with 3002 additions and 1780 deletions

View File

@@ -554,7 +554,7 @@ bool CvCapture_FFMPEG::open( const char* _filename )
goto exit_func;
}
err =
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 3, 0)
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0)
avformat_find_stream_info(ic, NULL);
#else
av_find_stream_info(ic);
@@ -2144,7 +2144,7 @@ bool InputMediaStream_FFMPEG::open(const char* fileName, int* codec, int* chroma
if (err < 0)
return false;
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 3, 0)
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0)
err = avformat_find_stream_info(ctx_, 0);
#else
err = av_find_stream_info(ctx_);

View File

@@ -200,10 +200,20 @@ static char* icvExtractPattern(const char *filename, unsigned *offset)
}
else // no pattern filename was given - extract the pattern
{
for(at = name; *at && !isdigit(*at); at++)
;
at = name;
if(!at)
// ignore directory names
char *slash = strrchr(at, '/');
if (slash) at = slash + 1;
#ifdef _WIN32
slash = strrchr(at, '\\');
if (slash) at = slash + 1;
#endif
while (*at && !isdigit(*at)) at++;
if(!*at)
return 0;
sscanf(at, "%u", offset);