added a FFMPEG preprocessaor definition

This commit is contained in:
Gerhard Kitzler 2014-01-15 12:04:03 +00:00
parent 12fd8ba93f
commit 468e661468

View File

@ -49,7 +49,7 @@ namespace netgen
#ifdef JPEGLIB #ifdef JPEGLIB
#include <jpeglib.h> #include <jpeglib.h>
#endif #endif
#define FFMPEG
#ifdef FFMPEG #ifdef FFMPEG
extern "C" { extern "C" {
/* /*
@ -2321,12 +2321,15 @@ namespace netgen
// Init codec context etc.: // Init codec context etc.:
//-------------------------- //--------------------------
// context = avcodec_alloc_context(); // context = avcodec_alloc_context();
context = avcodec_alloc_context3(codec); context = avcodec_alloc_context3(codec);
context->bit_rate = bitrate; context->bit_rate = bitrate;
context->width = nx; context->width = nx;
context->height = ny; context->height = ny;
context->time_base = (AVRational){ 1, 25 }; AVRational u;
u.den=25;
u.num=1;
context->time_base = u;
context->gop_size = gopsize; context->gop_size = gopsize;
context->max_b_frames = bframes; context->max_b_frames = bframes;
context->pix_fmt = PIX_FMT_YUV420P; context->pix_fmt = PIX_FMT_YUV420P;