Menu

#5 Won't compile with the new libavformat-dev

open
nobody
None
5
2011-12-20
2011-12-20
Anonymous
No

Getting errors similar to this: https://bugs.launchpad.net/ubuntu/+source/mediatomb/+bug/784431

cc -o mtn mtn.c -W -Wall -O3 -s -D_FILE_OFFSET_BITS=64 -march=native -lavcodec -lavformat -lavcodec -lswscale -lavutil -lgd -lfreetype -ljpeg -lz -lm -lpthread
mtn.c: In function 'save_AVFrame':
mtn.c:832:9: warning: passing argument 2 of 'sws_scale' from incompatible pointer type [enabled by default]
/usr/include/libswscale/swscale.h:233:5: note: expected 'const uint8_t * const*' but argument is of type 'uint8_t **'
mtn.c: At top level:
mtn.c:934:53: warning: 'enum CodecType' declared inside parameter list [enabled by default]
mtn.c:934:53: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
mtn.c:934:63: error: parameter 2 ('type') has incomplete type
mtn.c: In function 'get_stream_info_type':
mtn.c:947:13: error: 'CODEC_TYPE_SUBTITLE' undeclared (first use in this function)
mtn.c:947:13: note: each undeclared identifier is reported only once for each function it appears in
mtn.c:948:26: error: 'AVStream' has no member named 'language'
mtn.c:949:61: error: 'AVStream' has no member named 'language'
mtn.c:981:38: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
mtn.c:997:22: error: 'AVStream' has no member named 'language'
mtn.c:998:51: error: 'AVStream' has no member named 'language'
mtn.c:934:63: warning: unused parameter 'type' [-Wunused-parameter]
mtn.c: In function 'get_stream_info':
mtn.c:1024:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
mtn.c:1055:30: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function)
mtn.c:1056:30: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
mtn.c:1057:30: error: 'CODEC_TYPE_SUBTITLE' undeclared (first use in this function)
mtn.c: In function 'dump_format_context':
mtn.c:1079:10: error: 'AVFormatContext' has no member named 'track'
mtn.c:1080:50: error: 'AVFormatContext' has no member named 'track'
mtn.c:1081:10: error: 'AVFormatContext' has no member named 'title'
mtn.c:1082:50: error: 'AVFormatContext' has no member named 'title'
mtn.c:1083:10: error: 'AVFormatContext' has no member named 'author'
mtn.c:1084:51: error: 'AVFormatContext' has no member named 'author'
mtn.c:1085:10: error: 'AVFormatContext' has no member named 'copyright'
mtn.c:1086:54: error: 'AVFormatContext' has no member named 'copyright'
mtn.c:1087:10: error: 'AVFormatContext' has no member named 'comment'
mtn.c:1088:52: error: 'AVFormatContext' has no member named 'comment'
mtn.c:1089:10: error: 'AVFormatContext' has no member named 'album'
mtn.c:1090:50: error: 'AVFormatContext' has no member named 'album'
mtn.c:1091:10: error: 'AVFormatContext' has no member named 'year'
mtn.c:1092:49: error: 'AVFormatContext' has no member named 'year'
mtn.c:1093:10: error: 'AVFormatContext' has no member named 'genre'
mtn.c:1094:50: error: 'AVFormatContext' has no member named 'genre'
mtn.c: In function 'read_and_decode':
mtn.c:1190:13: warning: 'url_ferror' is deprecated (declared at /usr/include/libavformat/avio.h:305) [-Wdeprecated-declarations]
mtn.c:1206:68: error: 'PKT_FLAG_KEY' undeclared (first use in this function)
mtn.c:1218:9: warning: implicit declaration of function 'avcodec_decode_video' [-Wimplicit-function-declaration]
mtn.c: In function 'make_thumbnail':
mtn.c:1557:5: warning: 'av_open_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1050) [-Wdeprecated-declarations]
mtn.c:1579:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
mtn.c:1580:13: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
mtn.c:2017:13: warning: passing argument 2 of 'sws_scale' from incompatible pointer type [enabled by default]
/usr/include/libswscale/swscale.h:233:5: note: expected 'const uint8_t * const*' but argument is of type 'uint8_t **'
mtn.c:1466:10: warning: variable 'fill_buffer' set but not used [-Wunused-but-set-variable]
mtn.c: At top level:
mtn.c:2219:5: error: conflicting types for 'alphasort'
/usr/include/dirent.h:290:12: note: previous declaration of 'alphasort' was here
mtn.c: In function 'get_windows_argv':
mtn.c:2385:27: warning: unused parameter 'pargc' [-Wunused-parameter]
mtn.c:2385:42: warning: unused parameter 'pargv' [-Wunused-parameter]
make: *** [mtn] Error 1

Discussion


Log in to post a comment.