[FFmpeg-user] Segmentation Fault on avcodec_encode_video

Jorge Fonseca jcbfonseca at gmail.com
Thu Aug 2 23:25:23 CEST 2012


Hi All,

I am trying to encode a simple *bmp* frame into mpeg1video format.. As i
call *avcodec_encode_video*, a segmentation fault occurs.

I avoid to set specific format, and try to leave this responsibility with
ffmpeg...The only fields i set are:

    pCodec_ctx_output->bit_rate = 400000;
    pCodec_ctx_output->time_base.num = 1;
    pCodec_ctx_output->time_base.den = STREAM_FRAME_RATE;
    pCodec_ctx_output->gop_size = 12;
    pCodec_ctx_output->pix_fmt = STREAM_PIX_FMT;
    pCodec_ctx_output->mb_decision = 2;

A tried many values with no success.

--------------------

Any suggestion about this function usage and frames/codec setup?

--------------------

Regards,
Jorge.


More information about the ffmpeg-user mailing list