[Libav-user] "Segmentation fault" When encoding H264 video frame

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Sep 15 16:58:40 EEST 2016


2016-09-15 15:41 GMT+02:00 M N <assemblerx86 at yandex.com>:

> ==30670== Invalid read of size 8
> ==30670==    at 0x52E606E: avcodec_encode_video2 (utils.c:1932)
> ==30670==    by 0x401EC7: main (main.c:167)
> ==30670==  Address 0xa0 is not stack'd, malloc'd or (recently) free'd
> ==30670==
> ==30670==
> ==30670== Process terminating with default action of signal 11 (SIGSEGV)
> ==30670==  Access not within mapped region at address 0xA0
> ==30670==    at 0x52E606E: avcodec_encode_video2 (utils.c:1932)

The line is here "if (!avctx->codec->encode2) {" indicating you did not
initialize the parameter avctx sufficiently (setting up an encoder).

Carl Eugen


More information about the Libav-user mailing list