if (mad->index) {
guint64 x_bytes = mad->base_byte_offset + mad->bytes_consumed;
- gst_index_add_association (mad->index, mad->index_id, 0,
+ gst_index_add_association (mad->index, mad->index_id,
+ GST_ASSOCIATION_FLAG_DELTA_UNIT,
GST_FORMAT_BYTES, x_bytes, GST_FORMAT_TIME, time_offset, NULL);
}
#endif
#ifndef GST_DISABLE_INDEX
if (mpeg2dec->index) {
gst_index_add_association (mpeg2dec->index, mpeg2dec->index_id,
- (key_frame ? GST_ASSOCIATION_FLAG_KEY_UNIT : 0),
+ (key_frame ? GST_ASSOCIATION_FLAG_KEY_UNIT :
+ GST_ASSOCIATION_FLAG_DELTA_UNIT),
GST_FORMAT_BYTES, GST_BUFFER_OFFSET (outbuf),
GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (outbuf), 0);
}
outstream->scr_offs = 0;
if (mpeg_demux->index != NULL) {
- /* Register a new index position. */
+ /* Register a new index position.
+ * FIXME: check for keyframes
+ */
gst_index_add_association (mpeg_demux->index,
- outstream->index_id, 0,
+ outstream->index_id, GST_ASSOCIATION_FLAG_DELTA_UNIT,
GST_FORMAT_BYTES,
GST_BUFFER_OFFSET (buffer), GST_FORMAT_TIME, timestamp, 0);
}