From 2d4c6611699ad5d4fdd7ce4385e146cebc7479b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 28 Apr 2006 11:04:12 +0000 Subject: ext/faad/gstfaad.*: If we run into a decoding error, try re-opening the decoder with faacDecInit2() using fake codec ... Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_init), (aac_rate_idx), (gst_faad_setcaps), (gst_faad_chain), (gst_faad_open_decoder), (gst_faad_close_decoder), (gst_faad_change_state): * ext/faad/gstfaad.h: If we run into a decoding error, try re-opening the decoder with faacDecInit2() using fake codec data created from the data the demuxer gave us. Should fix a whole bunch of GStreamer-faad problems incl. 'channel coupling not implemented', 'maximum number of scalefactor bands exceeded' etc. (#173007, #332892). --- ext/faad/gstfaad.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext/faad/gstfaad.h') diff --git a/ext/faad/gstfaad.h b/ext/faad/gstfaad.h index 419ce20d..160b8ba4 100644 --- a/ext/faad/gstfaad.h +++ b/ext/faad/gstfaad.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_FAAD, GstFaadClass)) #define GST_IS_FAAD(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FAAD)) -#define GST_IS_FAAD_CLASS(obj) \ +#define GST_IS_FAAD_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FAAD)) typedef struct _GstFaad { @@ -46,6 +46,8 @@ typedef struct _GstFaad { guint channels; /* number of channels of the last frame */ guint bps; /* bytes per sample */ + guint8 fake_codec_data[2]; + GstBuffer *tempbuf; /* used to keep input leftovers */ /* FAAD object */ -- cgit v1.2.1