Update duration field

Original commit message from CVS:
Update duration field
This commit is contained in:
Wim Taymans 2003-05-29 10:12:29 +00:00
parent 0aba7e35bb
commit 1c65404179

View file

@ -1670,10 +1670,14 @@ gst_avi_demux_loop (GstElement *element)
guint32 got_bytes;
if (chunk.size) {
GstClockTime dur_ts;
got_bytes = gst_bytestream_peek (avi_demux->bs, &buf, chunk.size);
GST_BUFFER_TIMESTAMP (buf) = next_ts;
gst_pad_query (stream->pad, GST_QUERY_POSITION, &format, &dur_ts);
GST_BUFFER_DURATION (buf) = dur_ts - next_ts;
if (stream->need_flush) {
/* FIXME, do some flush event here */
stream->need_flush = FALSE;