]> git.sesse.net Git - vlc/blobdiff - modules/access_filter/bandwidth.c
Format string fixes
[vlc] / modules / access_filter / bandwidth.c
index ac075f60d78304668192afb62a522ec2fed782fd..bc1d711e082845682f315626b898b509037f330c 100644 (file)
@@ -2,7 +2,7 @@
  * bandwidth.c
  *****************************************************************************
  * Copyright © 2007 Rémi Denis-Courmont
- * $Id: dump.c 19948 2007-04-26 19:53:53Z courmisch $
+ * $Id$
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 
 #include <assert.h>
 #include <errno.h>
@@ -37,8 +42,8 @@ static void Close (vlc_object_t *);
 /* TODO: burst support */
 
 vlc_module_begin ();
-    set_shortname (_("Bandwidth"));
-    set_description (_("Bandwidth limiter"));
+    set_shortname (N_("Bandwidth"));
+    set_description (N_("Bandwidth limiter"));
     set_category (CAT_INPUT);
     set_subcategory (SUBCAT_INPUT_ACCESS_FILTER);
     set_capability ("access_filter", 0);
@@ -46,10 +51,10 @@ vlc_module_begin ();
     set_callbacks (Open, Close);
 
     add_integer ("access-bandwidth", 65536, NULL, BANDWIDTH_TEXT,
-                 BANDWIDTH_LONGTEXT, VLC_FALSE);
+                 BANDWIDTH_LONGTEXT, false);
 vlc_module_end();
 
-static int Read (access_t *access, uint8_t *buffer, int len);
+static ssize_t Read (access_t *access, uint8_t *buffer, size_t len);
 static int Seek (access_t *access, int64_t offset);
 static int Control (access_t *access, int cmd, va_list ap);
 
@@ -107,7 +112,7 @@ static void Close (vlc_object_t *obj)
 }
 
 
-static int Read (access_t *access, uint8_t *buffer, int len)
+static ssize_t Read (access_t *access, uint8_t *buffer, size_t len)
 {
     access_t *src = access->p_source;
     access_sys_t *p_sys = access->p_sys;
@@ -139,7 +144,7 @@ retry:
 
     if (len > delta)
     {
-        msg_Dbg (access, "reading %u bytes instead of %u", (unsigned)delta,
+        msg_Dbg (access, "reading %"PRIu64" bytes instead of %zu", delta,
                  len);
         len = (int)delta;
     }