[Ffmpeg-devel] AVCodecContext no frame_rate

Behrbaum, Jeffrey S jeffrey.s.behrbaum
Fri Jul 29 17:02:25 CEST 2005


Hi all. I'm getting a compile error I can't seem to figure out. The error keeps telling me that AVCodecContext has no frame_rate member. See below for the exact error. Also, please note that the code and make file are simplified. The values I'm setting are junk, I'm just trying to see why I'm getting this error. Also, I have the CVS code from 26 July 2005. I'm use Msys and MinGW to compile this on a Win32 platform.  All the other variables of the AVCodecContext seem to be fine. I can see the frame_rate int in the avcodec.h file but I have no idea why this compile error keeps creeping up!  Thank you again to any and all for your help.

./src/Main.cpp:23: error: 'struct AVCodecContext' has no member named 'frame_rate'

Below is my make file:

vpath %.cpp ./src
vpath %.h ./inc
vpath %.o ./obj

OBJ_FILE = 

MAIN : ${OBJ_FILE}
	g++ ./src/Main.cpp -o ./bin/MpegTest.exe \
	-I/ffmpeg/libavcodec -I/ffmpeg/libavformat -L/ffmpeg/libavformat -L/ffmpeg/libavcodec \
	-lavcodec -lavformat

clean:
	-rm ./obj/*.o
	-rm ./bin/MpegTest.exe

Below is my Main.cpp

//Standard C++ includes
#include <iostream>
#include <sstream>
#include <string>

//Local includes
#include "avcodec.h"
#include "avformat.h"

using namespace std;

int main(int arg, char **argc)
{
	AVCodecContext pAV_EncoderContext;

	pAV_EncoderContext.bit_rate = 225;
	pAV_EncoderContext.bit_rate_tolerance = 10;
	pAV_EncoderContext.flags = 1;
	pAV_EncoderContext.sub_id = 9;
	pAV_EncoderContext.me_method = 10;
	pAV_EncoderContext.extradata = NULL;
	pAV_EncoderContext.extradata_size = 100;
	pAV_EncoderContext.frame_rate = 12;//WHY NOT!
	pAV_EncoderContext.width = 200;
	pAV_EncoderContext.height = 400;
	pAV_EncoderContext.gop_size = 400;
//	pAV_EncoderContext.PixelFormat = 0;
	pAV_EncoderContext.rate_emu = 400;
	pAV_EncoderContext.sample_rate = 30;
	pAV_EncoderContext.channels = 2;
	pAV_EncoderContext.frame_size = 400;
	pAV_EncoderContext.frame_number = 400;

	return EXIT_SUCCESS;
}//End main





More information about the ffmpeg-devel mailing list