mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
send correct buffer offset after seek
Original commit message from CVS: send correct buffer offset after seek
This commit is contained in:
parent
25f85868d4
commit
63b0509428
2 changed files with 6 additions and 2 deletions
|
@ -623,7 +623,7 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
||||||
|
|
||||||
/* subbuffer it */
|
/* subbuffer it */
|
||||||
buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - nextmap, readsize);
|
buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - nextmap, readsize);
|
||||||
GST_BUFFER_OFFSET (buf) = mapstart + src->curoffset - nextmap;
|
GST_BUFFER_OFFSET (buf) = GST_BUFFER_OFFSET (src->mapbuf) + src->curoffset - nextmap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -637,6 +637,8 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're done, return the buffer */
|
/* we're done, return the buffer */
|
||||||
|
g_assert (src->curoffset == GST_BUFFER_OFFSET (buf));
|
||||||
|
g_print ("offset %u %u\n", (guint) src->curoffset, (guint) GST_BUFFER_OFFSET (buf));
|
||||||
src->curoffset += GST_BUFFER_SIZE(buf);
|
src->curoffset += GST_BUFFER_SIZE(buf);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -623,7 +623,7 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
||||||
|
|
||||||
/* subbuffer it */
|
/* subbuffer it */
|
||||||
buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - nextmap, readsize);
|
buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - nextmap, readsize);
|
||||||
GST_BUFFER_OFFSET (buf) = mapstart + src->curoffset - nextmap;
|
GST_BUFFER_OFFSET (buf) = GST_BUFFER_OFFSET (src->mapbuf) + src->curoffset - nextmap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -637,6 +637,8 @@ gst_filesrc_get_mmap (GstFileSrc *src)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're done, return the buffer */
|
/* we're done, return the buffer */
|
||||||
|
g_assert (src->curoffset == GST_BUFFER_OFFSET (buf));
|
||||||
|
g_print ("offset %u %u\n", (guint) src->curoffset, (guint) GST_BUFFER_OFFSET (buf));
|
||||||
src->curoffset += GST_BUFFER_SIZE(buf);
|
src->curoffset += GST_BUFFER_SIZE(buf);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue