Hello everyone,

A similar post exist but i have some different errors and it din help.

I am very new to ffmpeg and Unix kindof platform as well. I am using windows
XP, have installed MinGW, and ffmpeg.

$ ffmpeg
FFmpeg version SVN-r19973, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Sep 23 2009 11:51:42 with gcc 3.4.5 (mingw-vista special r3)
  configuration: --enable-memalign-hack
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.36. 0 / 52.36. 0
  libavformat   52.39. 0 / 52.39. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1

*I am trying to compile the C code tutorial01.c* located at
http://www.dranger.com/ffmpeg/tutorial01.html

using command : gcc -o tutorial01 tutorial01.c -lavformat -lavcodec -lz

I have placed the c file in /c/ffmpeg where libavcodec and format reside.

*I am getting a very large number{100's} of error messages, of which i'll
add a few below:*

c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1359: error: syntax error before "AVFrame"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1625: error: syntax error before "sample_aspect_ratio"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1632: error: syntax error before '*' token
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1672: error: syntax error before "error"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1916: error: syntax error before '*' token
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1923: error: syntax error before '*' token
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:1981: error: syntax error before "AVFrame"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:2403: error: syntax error before "timecode_frame_start"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:2429: error: syntax error before "reordered_opaque"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:2444: error: syntax error before "channel_layout"
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode
c.h:2451: error: syntax error before "request_channel_layout"
---
---
---many more errors
---
---
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode

c.h:3705: error: syntax error before '*' token
tutorial01.c:23:34: libavformat/avformat.h: No such file or directory
tutorial01.c:27: error: syntax error before '*' token
tutorial01.c: In function `SaveFrame':
tutorial01.c:33: error: `iFrame' undeclared (first use in this function)
tutorial01.c:33: error: (Each undeclared identifier is reported only once
tutorial01.c:33: error: for each function it appears in.)
tutorial01.c:43: error: `pFrame' undeclared (first use in this function)
tutorial01.c: In function `main':
tutorial01.c:50: error: `AVFormatContext' undeclared (first use in this
function)
tutorial01.c:50: error: `pFormatCtx' undeclared (first use in this function)

tutorial01.c:52: error: `pCodecCtx' undeclared (first use in this function)
tutorial01.c:53: error: `pCodec' undeclared (first use in this function)
tutorial01.c:54: error: `pFrame' undeclared (first use in this function)
tutorial01.c:55: error: `pFrameRGB' undeclared (first use in this function)
tutorial01.c:56: error: syntax error before "packet"
tutorial01.c:59: error: `uint8_t' undeclared (first use in this function)
tutorial01.c:59: error: `buffer' undeclared (first use in this function)
tutorial01.c:111: error: `PIX_FMT_RGB24' undeclared (first use in this
function)

tutorial01.c:112: error: type of formal parameter 1 is incomplete
tutorial01.c:113: error: syntax error before ')' token
tutorial01.c:118: error: syntax error before ')' token
tutorial01.c:123: error: `packet' undeclared (first use in this function)
tutorial01.c:133: error: syntax error before ')' token
tutorial01.c: At top level:
c:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/libavcodec/avcode

c.h:1083: error: storage size of `pix_fmt' isn't known

I am not sure if  I am doing things alrite, please suggest me if i am doing
thing wrong.
I am able to compile simple c programs correctly, but problem is with
avcodec headers.

Regards
Avinash P V
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to