mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-15 21:06:32 +00:00
filesrc: only update buffer size on short read
This commit is contained in:
parent
69e3639c96
commit
c93cde0a30
1 changed files with 2 additions and 1 deletions
|
@ -369,7 +369,8 @@ gst_file_src_fill (GstBaseSrc * basesrc, guint64 offset, guint length,
|
|||
}
|
||||
|
||||
gst_buffer_unmap (buf, &info);
|
||||
gst_buffer_resize (buf, 0, bytes_read);
|
||||
if (bytes_read != length)
|
||||
gst_buffer_resize (buf, 0, bytes_read);
|
||||
|
||||
GST_BUFFER_OFFSET (buf) = offset;
|
||||
GST_BUFFER_OFFSET_END (buf) = offset + bytes_read;
|
||||
|
|
Loading…
Reference in a new issue