diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index dd4e811b02..3141883743 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -480,14 +480,16 @@ gst_file_src_start (GstBaseSrc * basesrc) g_strerror (errno)); src->seekable = FALSE; } 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; } - 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