From: Zeeshan Ali Date: Mon, 12 May 2003 20:08:17 +0000 (+0000) Subject: Hacked lame to make it copy the timestamp on the source buffer to the sink buffer X-Git-Tag: 1.19.3~509^2~1916^2~165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e395ef243b509a781b305183c4a8e1864b4eef4;p=platform%2Fupstream%2Fgstreamer.git Hacked lame to make it copy the timestamp on the source buffer to the sink buffer Original commit message from CVS: Hacked lame to make it copy the timestamp on the source buffer to the sink buffer --- diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c index bccbc02..1c25915 100644 --- a/ext/lame/gstlame.c +++ b/ext/lame/gstlame.c @@ -630,6 +630,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf) GstBuffer *outbuf; gchar *mp3_data = NULL; gint mp3_buffer_size, mp3_size = 0; + guint mp3_ts = 0; gboolean eos = FALSE; lame = GST_LAME (gst_pad_get_parent (pad)); @@ -681,6 +682,8 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf) "encoded %d bytes of audio to %d bytes of mp3", GST_BUFFER_SIZE (buf), mp3_size); + mp3_ts = GST_BUFFER_TIMESTAMP (buf); + gst_buffer_unref (buf); } @@ -688,6 +691,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf) outbuf = gst_buffer_new (); GST_BUFFER_DATA (outbuf) = mp3_data; GST_BUFFER_SIZE (outbuf) = mp3_size; + GST_BUFFER_TIMESTAMP (outbuf) = mp3_ts; gst_pad_push (lame->srcpad,outbuf); }