Does the segmentation fault happen all the time, when tested on multiple different machines? Or is it hardware/OS dependent? Are the FFmpeg libraries up to date?. Have the global AVFrame, AVCodecContext, sws_context pointer variables been initialized prior to their use?.Is the input buffer large enough? Are the used DEFAULT_ and DEFAULT_ values valid? Is it necessary to use the heap?.So, it is difficult to say where the issue originates. * TODO: deallocate all resources here */Īnd checked like this: $ g++ -Wall -pedantic -o prg prg.cpp -lswscale -lavcodec -lavutil Void ffmpeg_encoder_start(AVCodecID codec_id, int fps, int width, int height) įfmpeg_encoder_start(AV_CODEC_ID_RAWVIDEO, 1, width, height) įfmpeg_encoder_set_frame_yuv_from_rgb(rgb_in) Here's how I set my codec: /* Allocate resources and write header data to the output file. But in this case I need from GL_RGB to AVFrame. I've googled it and found just examples of the other way around. For my project I need to convert a RGB ( GL_RGB) Image generated by glReadPixels into a AVFrame.
0 Comments
Leave a Reply. |