[GRASS-dev] error in lib/ogsf/gsd_img_mpeg.c

Paul Kelly paul-grass at stjohnspoint.co.uk
Sun Jan 11 19:02:24 EST 2009


On Mon, 12 Jan 2009, Hamish wrote:

> Hi & happy new year everybody,
>
>
> after svn up, libogsf in develbranch_6 does not build:
>
> gsd_img_mpeg.c: In function 'gsd_close_mpeg':
> gsd_img_mpeg.c:439: error: incompatible type for argument 1 of 'url_fclose'
> make[2]: *** [OBJ.i686-pc-linux-gnu/gsd_img_mpeg.o] Error 1
> make[2]: Leaving directory `/usr/local/src/grass/svn/grass64/lib/ogsf'
>
>
> seems to be a result of this change:
>  http://trac.osgeo.org/grass/changeset/35272
>  "Fix bug (pass pointer, not its address) (merge from trunk, r35270)"

Yes, although it's not a bugfix but a necessary change as the result of 
a change in the FFmpeg API, in November 2007:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-November/037797.html
(Note the ominous comment "I believe this patch will break compability 
with most applications"!)

This change makes GRASS require an FFMPEG version newer than that -
I would guess a lot of distributions are using FFmpeg versions older than 
November 2007 though? Perhaps the call to url_fclose could be 
conditionalised on the version of libavformat, something like (untested):
#ifdef (LIBAVFORMAT_VERSION_INT>>16) < 52
   url_fclose(&oc->pb);
#else
   url_fclose(oc->pb);
#endif

Paul



More information about the grass-dev mailing list