mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
Fix compile on systems with broken faad headers.
Original commit message from CVS: Fix compile on systems with broken faad headers.
This commit is contained in:
parent
6b94a5333e
commit
e765addd73
2 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-11 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
|
* ext/faad/gstfaad.c: (gst_faad_setcaps), (gst_faad_chain):
|
||||||
|
Make this compile on systems with broken headers.
|
||||||
|
|
||||||
2005-11-11 Michael Smith <msmith@fluendo.com>
|
2005-11-11 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* ext/faad/gstfaad.c: (gst_faad_setcaps), (gst_faad_chain):
|
* ext/faad/gstfaad.c: (gst_faad_setcaps), (gst_faad_chain):
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
#include <gst/audio/audio.h>
|
#include <gst/audio/audio.h>
|
||||||
#include <gst/audio/multichannel.h>
|
#include <gst/audio/multichannel.h>
|
||||||
|
|
||||||
/* These are the correct types for these functions, as defined in the source.
|
/* These are the correct types for these functions, as defined in the source,
|
||||||
|
* with types changed to match glib types, since those are defined for us.
|
||||||
* However, upstream FAAD is distributed with a broken header file that defined
|
* However, upstream FAAD is distributed with a broken header file that defined
|
||||||
* these wrongly (in a way which was broken on 64 bit systems).
|
* these wrongly (in a way which was broken on 64 bit systems).
|
||||||
* Upstream CVS still has the bug, but has also renamed all the public symbols
|
* Upstream CVS still has the bug, but has also renamed all the public symbols
|
||||||
|
@ -36,16 +37,15 @@
|
||||||
* but not all, hence this Truly Evil Hack. This hack will need updating if
|
* but not all, hence this Truly Evil Hack. This hack will need updating if
|
||||||
* upstream ever releases something with the new API.
|
* upstream ever releases something with the new API.
|
||||||
*/
|
*/
|
||||||
#define faadDecInit faadDecInit_no_definition
|
#define faacDecInit faadDecInit_no_definition
|
||||||
#define faadDecInit2 faadDecInit2_no_definition
|
#define faacDecInit2 faadDecInit2_no_definition
|
||||||
#include "gstfaad.h"
|
#include "gstfaad.h"
|
||||||
#undef faadDecInit
|
#undef faacDecInit
|
||||||
#undef faadDecInit2
|
#undef faacDecInit2
|
||||||
|
|
||||||
extern long faadDecInit (faacDecHandle, uint8_t *, uint32_t,
|
extern long faacDecInit (faacDecHandle, guint8 *, guint32, guint32 *, guint8 *);
|
||||||
uint32_t *, uint8_t *);
|
extern int8_t faacDecInit2 (faacDecHandle, guint8 *, guint32,
|
||||||
extern int8_t faadDecInit2 (faacDecHandle, uint8_t *, uint32_t,
|
guint32 *, guint8 *);
|
||||||
uint32_t *, uint8_t *);
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (faad_debug);
|
GST_DEBUG_CATEGORY_STATIC (faad_debug);
|
||||||
#define GST_CAT_DEFAULT faad_debug
|
#define GST_CAT_DEFAULT faad_debug
|
||||||
|
@ -227,7 +227,7 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
buf = GST_BUFFER (gst_value_get_mini_object (value));
|
buf = GST_BUFFER (gst_value_get_mini_object (value));
|
||||||
|
|
||||||
/* someone forgot that char can be unsigned when writing the API */
|
/* someone forgot that char can be unsigned when writing the API */
|
||||||
if ((gint8) faadDecInit2 (faad->handle,
|
if ((gint8) faacDecInit2 (faad->handle,
|
||||||
GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf), &samplerate,
|
GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf), &samplerate,
|
||||||
&channels) < 0) {
|
&channels) < 0) {
|
||||||
GST_DEBUG ("faacDecInit2() failed");
|
GST_DEBUG ("faacDecInit2() failed");
|
||||||
|
|
Loading…
Reference in a new issue