Re: [PATCH] MNG detection fails with libjpeg-turbo

The Wanderer <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Organization This space intentionally left blank.
Message-ID <[email protected]>
On 2017-11-26 at 15:36, The Wanderer wrote:

> With current SVN (and for as long as I can remember checking), the
> configure check for the availability of libmng fails. Today I finally
> got around to looking into why.
> 
> 
> The test performs a compile check against libmng.h, which includes
> jpeglib.h. With libjpeg-turbo (the source of jpeglib.h in current
> Debian), this test fails because FILE is undefined. This is typedef is
> normally expected to come from stdio.h.
> 
> https://github.com/libjpeg-turbo/libjpeg-turbo/issues/17
> indicates that this is intentional, for backwards compatibility with
> libjpeg, and that "it is actually a design requirement of the libjpeg
> API that you include stdio.h before including jpeglib.h.".
> 
> This would seem to indicate that this has been broken for a very long
> time, and quite possibly no one noticed (which would imply that no one
> bothered trying to compile with MNG support). The last MNG-related
> commits seem to have been in 2012; support was originally added in 2011.
> 
> 
> The compilation check is performed by the return_statement_check
> function, which only permits passing one header-file argument. There is
> an existing statement_check_broken function, specifically for use with
> headers which don't include some of their own dependencies; however, it
> hardcodes a 'return 0', whereas return_statement_check permits passing
> in an expression to be used in the return statement.
> 
> Rather than try to add an ' 0' to all callers of statement_check_broken,
> I've duplicated it into return_statement_check_broken, which adds the
> return-statement argument from return_statement_check.
> 
> With that, detection of libmng succeeds. With an include of stdio.h
> added to vo_mng.c, compilation also succeeds.

And, just for the record, the result of compilation does appear to work;
playing a file with 'vo mng:output=/path/to/file.mng' causes the file to
be created (though only when the player exits, for some reason), and the
resulting file can be played back.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEJCOqsZEc2qVC44pUBKk1jTQoMmsFAlocKEEACgkQBKk1jTQo
MmtYqQ/6Au40dOu4pxzyh79s0zdS3KagnYJ2T2xbjiokuRk8XbVO2g6v3lfrA1MQ
GjDyi1rl4hCq/i9W+akfKrn1GKFZX5OrnLcPqKV8u1FAtW6uaVVpbSk8VyYp0Xj5
P8X5tgIqYVRnuOubWxGnqNRNOzcL7Weml3Yvl7rIrG6JuDf6vB+wpy0SMaa9CZ5Z
MSYQx45ZNSLU2cnbGijVizNk82kwyDhFN8ecrbSqvC9ymk64csJdLGA5NIaB+03E
nPsFzFKp/3cSbMTupEeKnA5Nk84W6I7eP8mQozHslapjty8wIvCvYiI9mg9QDhsJ
a6Hv0IWpSps4c/9WnppF/YKT1SbzAeFl8fdy+j58C4pOZh8S3fujKvT+Je4NwMpo
cZXFHI1yjEBeBrT/zY0xqCnlBNa6wysyGnf9oSHaVkaG3lHdza6Q90J28Y1xrxTE
5fFrb7VjX8MmpI7g8uGvil5kaMU9bYbDLsDaUUnYD7Kxhvwj/z3BS/wb/T/mcu2X
VlrSd8J956rnLvfcJETUcdCR/sjiN82agF4kg4hcI5Us+YuYETnbOA9IN1UVrPzu
Smdaw7qGPSCMRuKW/+5cWohikLmUaFGJtelPzfiqHUqdZ8BV0QgIBKZNYdYU/0T5
HXQdvuBsMKNvTqBRzyNeogNY0Id9D5fie06l036LkxpxmOE9Ezg=
=XgbY
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.