Index: formats/format_ogg_vorbis.c =================================================================== --- formats/format_ogg_vorbis.c (revision 355573) +++ formats/format_ogg_vorbis.c (working copy) @@ -80,6 +80,28 @@ int eos; }; +#if 1 +/* + * Declared for backward compatibility with vorbisfile v1.1.2. + * Code taken from vorbisfile.h v1.2.0. + */ +static int my_ov_header_fseek_wrap(FILE *f, ogg_int64_t off, int whence) +{ + if (f == NULL) + return(-1); + return fseek(f, off, whence); +} + +static ov_callbacks MY_OV_CALLBACKS_NOCLOSE = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) my_ov_header_fseek_wrap, + (int (*)(void *)) NULL, + (long (*)(void *)) ftell +}; +#else +#define MY_OV_CALLBACKS_NOCLOSE OV_CALLBACKS_NOCLOSE +#endif + /*! * \brief Create a new OGG/Vorbis filestream and set it up for reading. * \param s File that points to on disk storage of the OGG/Vorbis data. @@ -95,7 +117,7 @@ desc->writing = 0; /* actually open file */ - result = ov_open_callbacks(s->f, &desc->ov_f, NULL, 0, OV_CALLBACKS_NOCLOSE); + result = ov_open_callbacks(s->f, &desc->ov_f, NULL, 0, MY_OV_CALLBACKS_NOCLOSE); if (result != 0) { ast_log(LOG_ERROR, "Error opening Ogg/Vorbis file stream.\n"); return -1;