mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
sparsefile: small cleanup
The error path unrefs file->file so make sure we only go there when there is a non-NULL file->file.
This commit is contained in:
parent
460a7bf682
commit
1d1f76a328
1 changed files with 2 additions and 3 deletions
|
@ -343,13 +343,12 @@ gst_sparse_file_read (GstSparseFile * file, gsize offset, gpointer data,
|
|||
goto error;
|
||||
}
|
||||
res = fread (data, 1, count, file->file);
|
||||
if (G_UNLIKELY (res < count))
|
||||
goto error;
|
||||
}
|
||||
|
||||
file->current_pos = offset + res;
|
||||
|
||||
if (G_UNLIKELY (res < count))
|
||||
goto error;
|
||||
|
||||
if (remaining)
|
||||
*remaining = range->stop - file->current_pos;
|
||||
|
||||
|
|
Loading…
Reference in a new issue