1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge branch '2.4'

This commit is contained in:
Andrey Kamaev
2013-02-22 17:33:30 +04:00
47 changed files with 669 additions and 376 deletions
@@ -125,7 +125,7 @@ CV_EXPORTS_W void setTrackbarPos(const string& trackbarname, const string& winna
// OpenGL support
typedef void (CV_CDECL *OpenGlDrawCallback)(void* userdata);
typedef void (*OpenGlDrawCallback)(void* userdata);
CV_EXPORTS void setOpenGlDrawCallback(const string& winname, OpenGlDrawCallback onOpenGlDraw, void* userdata = 0);
CV_EXPORTS void setOpenGlContext(const string& winname);
+8
View File
@@ -560,6 +560,10 @@ bool CvCapture_FFMPEG::open( const char* _filename )
if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0)
{
// backup encoder' width/height
int enc_width = enc->width;
int enc_height = enc->height;
AVCodec *codec = avcodec_find_decoder(enc->codec_id);
if (!codec ||
#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(8<<8)+0)
@@ -570,6 +574,10 @@ bool CvCapture_FFMPEG::open( const char* _filename )
< 0)
goto exit_func;
// checking width/height (since decoder can sometimes alter it, eg. vp6f)
if (enc_width && (enc->width != enc_width)) { enc->width = enc_width; }
if (enc_height && (enc->height != enc_height)) { enc->height = enc_height; }
video_stream = i;
video_st = ic->streams[i];
picture = avcodec_alloc_frame();