Commit 325e0b1a authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed ffmpeg backend build on Ubuntu 11.10

parent 3396a2ec
...@@ -540,7 +540,7 @@ bool CvCapture_FFMPEG::open( const char* _filename ) ...@@ -540,7 +540,7 @@ bool CvCapture_FFMPEG::open( const char* _filename )
avcodec_thread_init(enc, get_number_of_cpus()); avcodec_thread_init(enc, get_number_of_cpus());
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 4, 0) #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO #define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
#endif #endif
...@@ -631,7 +631,7 @@ bool CvCapture_FFMPEG::grabFrame() ...@@ -631,7 +631,7 @@ bool CvCapture_FFMPEG::grabFrame()
continue; continue;
} }
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 4, 0) #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet); avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet);
#else #else
#if LIBAVFORMAT_BUILD > 4628 #if LIBAVFORMAT_BUILD > 4628
...@@ -881,7 +881,7 @@ struct CvVideoWriter_FFMPEG ...@@ -881,7 +881,7 @@ struct CvVideoWriter_FFMPEG
static const char * icvFFMPEGErrStr(int err) static const char * icvFFMPEGErrStr(int err)
{ {
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 4, 0) #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
switch(err) { switch(err) {
case AVERROR_BSF_NOT_FOUND: case AVERROR_BSF_NOT_FOUND:
return "Bitstream filter not found"; return "Bitstream filter not found";
...@@ -1333,7 +1333,7 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, ...@@ -1333,7 +1333,7 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
/* auto detect the output format from the name and fourcc code. */ /* auto detect the output format from the name and fourcc code. */
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 4, 0) #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
fmt = av_guess_format(NULL, filename, NULL); fmt = av_guess_format(NULL, filename, NULL);
#else #else
fmt = guess_format(NULL, filename, NULL); fmt = guess_format(NULL, filename, NULL);
...@@ -1361,7 +1361,7 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, ...@@ -1361,7 +1361,7 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
#endif #endif
// alloc memory for context // alloc memory for context
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 4, 0) #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
oc = avformat_alloc_context(); oc = avformat_alloc_context();
#else #else
oc = av_alloc_format_context(); oc = av_alloc_format_context();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment