mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
ext/wavpack/gstwavpackdec.c: More build fixes for old libwavpack versions: include config.h so that WAVPACK_OLD_API i...
Original commit message from CVS: * ext/wavpack/gstwavpackdec.c: More build fixes for old libwavpack versions: include config.h so that WAVPACK_OLD_API is actually defined as detected; only use WavpackGetErrorMessage if it is available. This fixes the build on debian stable for me.
This commit is contained in:
parent
857bc80049
commit
8e51b9930b
2 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-12-09 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* ext/wavpack/gstwavpackdec.c:
|
||||
More build fixes for old libwavpack versions: include config.h so
|
||||
that WAVPACK_OLD_API is actually defined as detected; only use
|
||||
WavpackGetErrorMessage if it is available. This fixes the build
|
||||
on debian stable for me.
|
||||
|
||||
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain):
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
* </refsect2>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/audio/audio.h>
|
||||
#include <gst/audio/multichannel.h>
|
||||
|
@ -410,10 +414,17 @@ invalid_header:
|
|||
}
|
||||
decode_error:
|
||||
{
|
||||
const gchar *reason = "unknown";
|
||||
|
||||
if (dec->context) {
|
||||
#ifndef WAVPACK_OLD_API
|
||||
reason = WavpackGetErrorMessage (dec->context);
|
||||
#endif
|
||||
} else {
|
||||
reason = "couldn't create decoder context";
|
||||
}
|
||||
GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL),
|
||||
("Failed to decode wavpack stream: %s",
|
||||
(dec->context) ? WavpackGetErrorMessage (dec->
|
||||
context) : "couldn't create decoder context"));
|
||||
("Failed to decode wavpack stream: %s", reason));
|
||||
gst_buffer_unref (outbuf);
|
||||
gst_buffer_unref (buf);
|
||||
return GST_FLOW_ERROR;
|
||||
|
|
Loading…
Reference in a new issue