mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
index: use delta frame flags instead of 0 or none
This commit is contained in:
parent
0d20df6d2b
commit
9424c553b9
3 changed files with 8 additions and 4 deletions
|
@ -1676,7 +1676,8 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
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
|
||||
|
|
|
@ -890,7 +890,8 @@ handle_slice (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
|
|||
#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);
|
||||
}
|
||||
|
|
|
@ -1030,9 +1030,11 @@ gst_mpeg_demux_send_subbuffer (GstMPEGDemux * mpeg_demux,
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue