From: <rb...@fr...> - 2005-01-06 10:35:05
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: rbultje Date: Thu Jan 06 2005 02:34:52 PST Log message: * ext/faad/gstfaad.c: (gst_faad_chain): Only increment timestamp if it's valid. Fixes raw AAC streams. Modified files: . : ChangeLog ext/faad : gstfaad.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1455&r2=1.1456 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/faad/gstfaad.c.diff?r1=1.22&r2=1.23 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1455 retrieving revision 1.1456 diff -u -d -r1.1455 -r1.1456 --- ChangeLog 6 Jan 2005 06:48:01 -0000 1.1455 +++ ChangeLog 6 Jan 2005 10:34:40 -0000 1.1456 @@ -1,3 +1,8 @@ +2005-01-06 Ronald S. Bultje <rb...@ro...> + + * ext/faad/gstfaad.c: (gst_faad_chain): + Only increment timestamp if it's valid. Fixes raw AAC streams. 2005-01-06 Benjamin Otte <in...@pu...> * configure.ac: Index: gstfaad.c RCS file: /cvs/gstreamer/gst-plugins/ext/faad/gstfaad.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- gstfaad.c 3 Dec 2004 15:34:19 -0000 1.22 +++ gstfaad.c 6 Jan 2005 10:34:40 -0000 1.23 @@ -60,34 +60,34 @@ #define STATIC_CAPS \ STATIC_INT_CAPS (16) #if 0 -"; " -STATIC_INT_CAPS (24) - "; " -STATIC_INT_CAPS (32) -STATIC_FLOAT_CAPS (32) +#define NOTUSED "; " \ +STATIC_INT_CAPS (24) \ + "; " \ +STATIC_INT_CAPS (32) \ +STATIC_FLOAT_CAPS (32) \ STATIC_FLOAT_CAPS (64) #endif - static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS (STATIC_CAPS) ); - static void gst_faad_base_init (GstFaadClass * klass); - static void gst_faad_class_init (GstFaadClass * klass); - static void gst_faad_init (GstFaad * faad); +static void gst_faad_base_init (GstFaadClass * klass); +static void gst_faad_class_init (GstFaadClass * klass); +static void gst_faad_init (GstFaad * faad); - static GstPadLinkReturn - gst_faad_sinkconnect (GstPad * pad, const GstCaps * caps); - gst_faad_srcconnect (GstPad * pad, const GstCaps * caps); - static GstCaps *gst_faad_srcgetcaps (GstPad * pad); - static void gst_faad_chain (GstPad * pad, GstData * data); - static GstElementStateReturn gst_faad_change_state (GstElement * element); +static GstPadLinkReturn +gst_faad_sinkconnect (GstPad * pad, const GstCaps * caps); +gst_faad_srcconnect (GstPad * pad, const GstCaps * caps); +static GstCaps *gst_faad_srcgetcaps (GstPad * pad); +static void gst_faad_chain (GstPad * pad, GstData * data); +static GstElementStateReturn gst_faad_change_state (GstElement * element); - static GstElementClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; /* static guint gst_faad_signals[LAST_SIGNAL] = { 0 }; */ @@ -654,7 +654,9 @@ GST_BUFFER_TIMESTAMP (outbuf) = next_ts; GST_BUFFER_DURATION (outbuf) = (guint64) GST_SECOND *info->samples / faad->samplerate; - next_ts += GST_BUFFER_DURATION (outbuf); + if (GST_CLOCK_TIME_IS_VALID (next_ts)) { + next_ts += GST_BUFFER_DURATION (outbuf); + } gst_pad_push (faad->srcpad, GST_DATA (outbuf)); } } |