[FFmpeg-devel] [PATCH] doc/examples/muxing: make compatible with C++

Nicolas George george at nsup.org
Fri Mar 14 17:23:52 CET 2014


Le quartidi 24 ventôse, an CCXXII, Michael Niedermayer a écrit :
> People who want to use ffmpeg from C++ need examples which work in
> C++.

People who want to use ffmpeg from INTERCAL need examples that work in
INTERCAL, shall we make the examples INTERCAL-compatible too?

INTERCAL is a ridiculous example, but the same applies to all languages that
are actually used, including java and PHP.

The casts you added are necessary in c++ but they are bad practice in C.
That makes the example weaker, as it no longer shows the best practices.

There are certainly dozens of tutorials on how to get C code to build as
c++, explaining just what you did with the examples. And actually, this is
basic programming skill: someone who does not have it should probably not
try something as hard as multimedia processing yet.

I am not against a pure c++ example, but making the C examples less readable
and getting them to show bad practice is IMHO a very bad idea.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140314/c2249e8f/attachment.asc>


More information about the ffmpeg-devel mailing list