[FFmpeg-user] Segmentation Fault on avcodec_encode_video

Roger Pack rogerdpack2 at gmail.com
Tue Aug 7 23:29:07 CEST 2012


> 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;
>
> Any suggestion about this function usage and frames/codec setup?

More of a question for libav-user, but I have heard you can use gdb to
"breakpointer" where it sets these values, then copy them to your app.


More information about the ffmpeg-user mailing list