[FFmpeg-devel] [PATCH] examples/decoding_encoding: remove unused variable "size"

Clément Bœsch ubitux at gmail.com
Fri Apr 13 09:14:36 CEST 2012


On Fri, Apr 13, 2012 at 08:43:44AM +0200, Nicolas George wrote:
> Le quintidi 25 germinal, an CCXX, Clément Bœsch a écrit :
> > The -lm is not needed for the libraries, but for the tool.
> 
> That is clearly wrong. I believe your shared object is badly linked. It
> should have -lm in its NEEDED fields.
> 

I think there is a misunderstanding; I meant the link fails because the
tool requires the -lm (because of the sin() dep), it's not an issue with
the library (libm is indeed in the NEEDED field of the libav*).

> > muxing and decoding_encoding both use sin(), so actually they do.
> 
> I forgot that, indeed. Then -lm is necessary. And -lm is specified by the
> standard:
> 
> -l m
> 	This option shall make available all interfaces referenced in
> 	<math.h>, <complex.h>, and <fenv.h>.
> 
> And the example should include math.h too, IMHO.
> 

So we can unconditionally add -lm in LDFLAGS for decoding_encoding and
muxing? François seems to raise a portability issue about this.

Another solution might be to make use of lavfi/aevalsrc instead, but it
might uselessly complicates the examples.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120413/2bd5d9fe/attachment.asc>


More information about the ffmpeg-devel mailing list