mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
splitfilesrc: set offsets on buffers
Looks like some parsers (in some versions at least) expect the offsets to be set, and behave weird if that's not the case (e.g. off-by-one in h264parse).
This commit is contained in:
parent
2dd67036e5
commit
a595df5daa
1 changed files with 4 additions and 0 deletions
|
@ -497,6 +497,10 @@ gst_split_file_src_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
||||||
cur_part.stop, cur_part.path);
|
cur_part.stop, cur_part.path);
|
||||||
|
|
||||||
buf = gst_buffer_new_and_alloc (size);
|
buf = gst_buffer_new_and_alloc (size);
|
||||||
|
|
||||||
|
GST_BUFFER_OFFSET (buf) = offset;
|
||||||
|
GST_BUFFER_OFFSET_END (buf) = offset + size;
|
||||||
|
|
||||||
data = GST_BUFFER_DATA (buf);
|
data = GST_BUFFER_DATA (buf);
|
||||||
|
|
||||||
cancel = src->cancellable;
|
cancel = src->cancellable;
|
||||||
|
|
Loading…
Reference in a new issue