[Libav-user] segmentation fault on avcodec_decode_video2( ) call

Jason Blum jason.j.blum at gmail.com
Wed Mar 12 00:45:53 CET 2014


> Once you do that and you get linker errors, paste those
> to pastebin and link here I guess.

The order of the linking makes a difference between the types of
undefined reference errors that I'm getting.

If I use:

g++ -g -D__STDC_CONSTANT_MACROS -L/usr/local/lib/ -lswscale -lavformat
-lavcodec main.cpp

it results in the following: http://pastebin.com/LtJzA7Hj

If I use:

g++ main.cpp -g -D__STDC_CONSTANT_MACROS -L/usr/local/lib/ -lswscale
-lavformat -lavcodec

it results a 16000 line long error output too large for free PasteBin.
The abridged version: http://pastebin.com/8dsv2pMY

I don't really understand linking order issues, but I would have
guessed at least one of the orders would have worked. If I don't
include the -D__STDC_CONST_MACROS flag, one of the header files
complains, so I think it is including the headers, which are in
/usr/local/include.

Any ideas what I'm missing?

Thanks,
Jason


More information about the Libav-user mailing list