[Libav-user] Compile with g++

Michael Chisholm chisholm at mitre.org
Wed Oct 9 01:00:30 CEST 2013


On 10/8/2013 6:19 PM, Carl Eugen Hoyos wrote:
> Michael Chisholm <chisholm at ...> writes:
>
>> demuxing.c: In function 'int main(int, char**)':
>> demuxing.c:261:66: error: invalid conversion from 'void*' to 'uint8_t**
>> {aka unsigned char**}' [-fpermissive]
>>            audio_dst_data = av_mallocz(sizeof(uint8_t *) * nb_planes);
>>                                                                     ^
>
> demuxing.c is a C program, if you want to compile it
> with C++ (why?) you will have to convert it to C++,
> just as with any other C program.
> (Nothing about this is FFmpeg specific.)
>

Of course I wouldn't normally compile a C application with other than a 
C compiler.  There is overlap between C and C++, and the above was just 
an experiment which basically shows that ffmpeg strays outside the 
overlapping region.  And I know as a C project, you have no obligation 
to make the code "C++-friendly".

>> Is that the kind of error you are seeing (this is from ffmpeg 2.0.1)?
>
>> I am admittedly using an older version of libav (0.8.6)
>
> Just to make sure: This is known to broken (and said to
> be exploitable) so please understand that we cannot
> support it here.
>

Yeah, I wouldn't ask for support for that here.  But if James is willing 
to use it, perhaps that will better fit his need.  Or maybe there is an 
earlier version of ffmpeg which is more C++-friendly.  And of course he 
can always use his API-indirection idea to wrap C++-unfriendly APIs with 
C++-friendly ones.

Andy




More information about the Libav-user mailing list