mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
filesrc: Ignore seek error on non-seekable files
This make it works with FIFOs. https://bugzilla.gnome.org/show_bug.cgi?id=731176
This commit is contained in:
parent
a76f319e3b
commit
f53a8a85a7
1 changed files with 8 additions and 6 deletions
|
@ -480,14 +480,16 @@ gst_file_src_start (GstBaseSrc * basesrc)
|
||||||
g_strerror (errno));
|
g_strerror (errno));
|
||||||
src->seekable = FALSE;
|
src->seekable = FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
res = lseek (src->fd, 0, SEEK_SET);
|
||||||
|
|
||||||
|
if (res < 0) {
|
||||||
|
/* We really don't like not being able to go back to 0 */
|
||||||
|
src->seekable = FALSE;
|
||||||
|
goto lseek_wonky;
|
||||||
|
}
|
||||||
|
|
||||||
src->seekable = TRUE;
|
src->seekable = TRUE;
|
||||||
}
|
}
|
||||||
res = lseek (src->fd, 0, SEEK_SET);
|
|
||||||
if (res < 0) {
|
|
||||||
/* We really don't like not being able to go back to 0 */
|
|
||||||
src->seekable = FALSE;
|
|
||||||
goto lseek_wonky;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We can only really do seeking on regular files - for other file types, we
|
/* We can only really do seeking on regular files - for other file types, we
|
||||||
|
|
Loading…
Reference in a new issue