filesrc: don't try to seek to -1 offset

The offset can be -1 when we are configured in TIME format. Instead of
failing the seek and erroring, do what and offset of -1 is supposed to
do and simply read from the current offset.
This commit is contained in:
Wim Taymans 2014-01-07 16:18:37 +01:00
parent 74adc33982
commit c80ea6895d

View file

@ -330,7 +330,7 @@ gst_file_src_fill (GstBaseSrc * basesrc, guint64 offset, guint length,
src = GST_FILE_SRC_CAST (basesrc);
if (G_UNLIKELY (src->read_position != offset)) {
if (G_UNLIKELY (offset != -1 && src->read_position != offset)) {
off_t res;
res = lseek (src->fd, offset, SEEK_SET);