mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
Some more fseeko checks.
Original commit message from CVS: * configure.ac: * gst/playback/gstqueue2.c: (gst_queue_create_read): Some more fseeko checks.
This commit is contained in:
parent
b7c415e7cb
commit
1a31080014
3 changed files with 19 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-06-06 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* configure.ac:
|
||||
* gst/playback/gstqueue2.c: (gst_queue_create_read):
|
||||
Some more fseeko checks.
|
||||
|
||||
2007-06-06 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -230,6 +230,9 @@ AC_C_INLINE
|
|||
|
||||
dnl *** checks for library functions ***
|
||||
|
||||
dnl check for fseeko()
|
||||
AC_FUNC_FSEEKO
|
||||
|
||||
dnl Check for fast float to int casting as defined in C99
|
||||
dnl used in gst-libs/gst/floatcast/floatcast.h
|
||||
AC_C99_FUNC_LRINT
|
||||
|
|
|
@ -786,7 +786,6 @@ gst_queue_create_read (GstQueue * queue, guint64 offset, guint length,
|
|||
{
|
||||
size_t res;
|
||||
GstBuffer *buf;
|
||||
off_t sres;
|
||||
|
||||
/* check if we have enough data at @offset. If there is not enough data, we
|
||||
* block and wait. */
|
||||
|
@ -794,9 +793,17 @@ gst_queue_create_read (GstQueue * queue, guint64 offset, guint length,
|
|||
GST_QUEUE_WAIT_ADD_CHECK (queue, out_flushing);
|
||||
}
|
||||
|
||||
sres = fseeko (queue->temp_file, offset, SEEK_SET);
|
||||
if (G_UNLIKELY (sres < 0))
|
||||
#ifdef HAVE_FSEEKO
|
||||
if (fseeko (queue->temp_file, (off_t) offset, SEEK_SET) != 0)
|
||||
goto seek_failed;
|
||||
#elif defined (G_OS_UNIX)
|
||||
if (lseek (fileno (queue->temp_file), (off_t) offset,
|
||||
SEEK_SET) == (off_t) - 1)
|
||||
goto seek_failed;
|
||||
#else
|
||||
if (fseek (queue->temp_file, (long) offset, SEEK_SET) != 0)
|
||||
goto seek_failed;
|
||||
#endif
|
||||
|
||||
buf = gst_buffer_new_and_alloc (length);
|
||||
|
||||
|
|
Loading…
Reference in a new issue