mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
fakesrc: put byte position rather than buffer count into GST_BUFFER_OFFSET
If we're sending a segment in BYTE format, the offset should be in bytes as well.
This commit is contained in:
parent
dc1c3c5094
commit
b259b5c476
2 changed files with 1 additions and 6 deletions
|
@ -357,7 +357,6 @@ static void
|
|||
gst_fake_src_init (GstFakeSrc * fakesrc)
|
||||
{
|
||||
fakesrc->output = FAKE_SRC_FIRST_LAST_LOOP;
|
||||
fakesrc->buffer_count = 0;
|
||||
fakesrc->silent = DEFAULT_SILENT;
|
||||
fakesrc->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS;
|
||||
fakesrc->dump = DEFAULT_DUMP;
|
||||
|
@ -781,7 +780,7 @@ gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
|
|||
src = GST_FAKE_SRC (basesrc);
|
||||
|
||||
buf = gst_fake_src_create_buffer (src, &size);
|
||||
GST_BUFFER_OFFSET (buf) = src->buffer_count++;
|
||||
GST_BUFFER_OFFSET (buf) = offset;
|
||||
|
||||
if (src->datarate > 0) {
|
||||
time = (src->bytes_sent * GST_SECOND) / src->datarate;
|
||||
|
@ -885,7 +884,6 @@ gst_fake_src_start (GstBaseSrc * basesrc)
|
|||
|
||||
src = GST_FAKE_SRC (basesrc);
|
||||
|
||||
src->buffer_count = 0;
|
||||
src->pattern_byte = 0x00;
|
||||
src->bytes_sent = 0;
|
||||
|
||||
|
|
|
@ -140,9 +140,6 @@ struct _GstFakeSrc {
|
|||
gboolean sync;
|
||||
GstClock *clock;
|
||||
|
||||
gint num_buffers;
|
||||
gint rt_num_buffers; /* we are going to change this at runtime */
|
||||
gint64 buffer_count;
|
||||
gboolean silent;
|
||||
gboolean signal_handoffs;
|
||||
gboolean dump;
|
||||
|
|
Loading…
Reference in a new issue