Opened 12 years ago

Closed 12 years ago

#985 closed defect (fixed)

libutvideo wrapper compilation fails with invalid conversion, initialization errors

Reported by: qyot27 Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: utvideo
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When attempting to compile FFmpeg, errors were reached when it got to the libutvideo wrapper. The same configure was fine until about a week ago, which coincides with some avcodec_open and avcodec_close related commits. I first saw it when using MinGW-w64 (i686-w64-mingw32-gcc/-g++ 4.6.1) to cross-compile under Ubuntu 11.10, but native compilation (also 4.6.1) encounters these initialization conversion errors too.

(cross-compile):
./configure --prefix=$HOME/win32_build --cross-prefix=i686-w64-mingw32- --enable-gpl --enable-version3 --disable-w32threads --enable-memalign-hack --disable-decoder=utvideo --enable-libutvideo --disable-encoders --disable-muxers --disable-debug --disable-network --disable-hwaccels --disable-indevs --disable-outdevs --cpu=pentium3 --extra-cflags="-march=pentium3 -mtune=pentium3 -DPTW32_STATIC_LIB" --target-os=mingw32 --arch=x86

(native):
./configure --prefix=$HOME/win32_build --enable-gpl --enable-version3 --disable-decoder=utvideo --enable-libutvideo --disable-encoders --disable-muxers --disable-debug --disable-network --disable-hwaccels --disable-indevs --disable-outdevs --cpu=pentium3 --extra-cflags="-march=pentium3 -mtune=pentium3"

The error received:

CXX	libavcodec/libutvideo.o
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wno-format-zero-length’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wno-pointer-sign’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wno-pointer-to-int-cast’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-std=c99’ is valid for C/ObjC but not for C++ [enabled by default]
libavcodec/libutvideo.cpp:72:18: warning: multi-character character constant [-Wmultichar]
libavcodec/libutvideo.cpp:76:18: warning: multi-character character constant [-Wmultichar]
libavcodec/libutvideo.cpp:205:1: error: cannot convert ‘AVMediaType’ to ‘const char*’ in initialization
libavcodec/libutvideo.cpp:205:1: error: cannot convert ‘CodecID’ to ‘AVMediaType’ in initialization
libavcodec/libutvideo.cpp:205:1: error: invalid conversion from ‘unsigned int’ to ‘CodecID’ [-fpermissive]
libavcodec/libutvideo.cpp:205:1: error: invalid conversion from ‘int (*)(AVCodecContext*)’ to ‘int’ [-fpermissive]
libavcodec/libutvideo.cpp:205:1: error: cannot convert ‘int (*)(AVCodecContext*)’ to ‘const PixelFormat*’ in initialization
libavcodec/libutvideo.cpp:205:1: error: cannot convert ‘int (*)(AVCodecContext*, void*, int*, AVPacket*)’ to ‘const int*’ in initialization
libavcodec/libutvideo.cpp:205:1: warning: converting to non-pointer type ‘uint8_t {aka unsigned char}’ from NULL [-Wconversion-null]
libavcodec/libutvideo.cpp:205:1: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
make: *** [libavcodec/libutvideo.o] Error 1

Attachments (1)

patchutvideo.diff (791 bytes ) - added by Carl Eugen Hoyos 12 years ago.

Download all attachments as: .zip

Change History (4)

by Carl Eugen Hoyos, 12 years ago

Attachment: patchutvideo.diff added

comment:1 by Carl Eugen Hoyos, 12 years ago

Keywords: utvideo added
Priority: normalimportant
Status: newopen

Could you test attached patch?

in reply to:  1 comment:2 by qyot27, 12 years ago

Replying to cehoyos:

Could you test attached patch?

Patch tested. Compilation proceeds and completes successfully with both of the configure lines given.

comment:3 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Thank you for testing!
Patch applied with some additional comments.

Note: See TracTickets for help on using tickets.