[Libav-user] error avformat.h: avformat undeclared

Alex Cohn alexcohn at netvision.net.il
Mon May 7 21:04:48 CEST 2012


On May 7, 2012 9:39 PM, <curer57458 at mypacks.net> wrote:
>
> Hi libav user,
>
> Where is AVFormat declared for the ffmpeg header file avformat.h found in
/usr/include/libavformat/avformat.h?
>
>  libavutil      51. 34.101 / 51. 34.101
>  libavcodec     53. 60.100 / 53. 60.100
>  libavformat    53. 31.100 / 53. 31.100
>  libavdevice    53.  4.100 / 53.  4.100
>  libavfilter     2. 60.100 /  2. 60.100
>  libswscale      2.  1.100 /  2.  1.100
>  libswresample   0.  6.100 /  0.  6.100
>  libpostproc    52.  0.100 / 52.  0.100
>
> The compilation error is from an application including the header file
avformat.h:
> error: ‘AVPacket’ was not declared in this scope
>
> This error was also there with an older version of libavformat: 52 75 0.
> A google search was not helpful in finding out where AVFormat is
declared. Are there some CFLAGS that are needed to work with avformat.h, or
what is missing? Also, the older version avformat.h 52 75 0 had the version
defined in a MACRO and had a comment with swear words in it and "douchebag"
while the newer version 53 31 100 did not.

If your source is C++, you must include av headers like

extern "C" {
#include "avformat.h"
}

BR,
Alex Cohn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120507/306deb24/attachment.html>


More information about the Libav-user mailing list