gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r23079 - Extractor/src/plugins


From: gnunet
Subject: [GNUnet-SVN] r23079 - Extractor/src/plugins
Date: Sat, 4 Aug 2012 00:35:39 +0200

Author: LRN
Date: 2012-08-04 00:35:39 +0200 (Sat, 04 Aug 2012)
New Revision: 23079

Modified:
   Extractor/src/plugins/ogg_extractor.c
Log:
Fix seeking in ogg plugin

Modified: Extractor/src/plugins/ogg_extractor.c
===================================================================
--- Extractor/src/plugins/ogg_extractor.c       2012-08-03 22:35:36 UTC (rev 
23078)
+++ Extractor/src/plugins/ogg_extractor.c       2012-08-03 22:35:39 UTC (rev 
23079)
@@ -69,7 +69,7 @@
  * @param datasource  the 'struct EXTRACTOR_ExtractContext'
  * @param offset where to seek
  * @param whence how to seek
- * @return -1 on error
+ * @return -1 on error, new position on success
  */
 static int 
 seek_ogg (void *datasource,
@@ -77,12 +77,8 @@
          int whence)
 {
   struct EXTRACTOR_ExtractContext *ec = datasource;
-
-  if (-1 == ec->seek (ec->cls,
-                     (int64_t) offset,
-                     whence))
-    return -1;
-  return 0;
+  int64_t new_position = ec->seek (ec->cls, (int64_t) offset, whence);
+  return (long) new_position;
 }
 
 
@@ -162,7 +158,8 @@
   callbacks.seek_func = &seek_ogg;
   callbacks.close_func = NULL;
   callbacks.tell_func = &tell_ogg;
-  if (0 != ov_open_callbacks (ec, &vf, NULL, 0, callbacks))
+  ret = ov_open_callbacks (ec, &vf, NULL, 0, callbacks);
+  if (0 != ret)
   {
     ov_clear (&vf);
     return;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]