Fix timestamps

Original commit message from CVS:
Fix timestamps
This commit is contained in:
Wim Taymans 2002-12-31 16:32:32 +00:00
parent b36db2b3db
commit 9ba6871226

View file

@ -389,6 +389,7 @@ gst_a52dec_loop (GstElement *element)
GstBuffer *buf; GstBuffer *buf;
guint32 got_bytes; guint32 got_bytes;
gboolean need_reneg; gboolean need_reneg;
GstClockTime timestamp;
a52dec = GST_A52DEC (element); a52dec = GST_A52DEC (element);
@ -430,6 +431,7 @@ gst_a52dec_loop (GstElement *element)
return; return;
} }
data = GST_BUFFER_DATA (buf); data = GST_BUFFER_DATA (buf);
timestamp = gst_bytestream_get_timestamp (a52dec->bs);
/* process */ /* process */
flags = a52dec->request_channels | A52_ADJUST_LEVEL; flags = a52dec->request_channels | A52_ADJUST_LEVEL;
@ -464,7 +466,7 @@ gst_a52dec_loop (GstElement *element)
continue; continue;
} }
/* push on */ /* push on */
if (gst_a52dec_push (a52dec->srcpad, a52dec->using_channels, a52dec->samples, GST_BUFFER_TIMESTAMP (buf))) { if (gst_a52dec_push (a52dec->srcpad, a52dec->using_channels, a52dec->samples, timestamp)) {
g_warning ("a52dec push error\n"); g_warning ("a52dec push error\n");
} }
} }