celtdec: fix error checking with libcelt 0.11

The return value of celt_decode has changed, newer versions
now return positive values on success.

https://bugzilla.gnome.org/show_bug.cgi?id=659087
This commit is contained in:
Vincent Penquerc'h 2011-09-14 17:26:05 +01:00 committed by Sebastian Dröge
parent 90b2484648
commit 37e688197d

View file

@ -760,7 +760,11 @@ celt_dec_chain_parse_data (GstCeltDec * dec, GstBuffer * buf,
#else
error = celt_decode (dec->state, data, size, out_data);
#endif
#ifdef HAVE_CELT_0_11
if (error < 0) {
#else
if (error != CELT_OK) {
#endif
GST_WARNING_OBJECT (dec, "Decoding error: %d", error);
return GST_FLOW_ERROR;
}