diff utils.c @ 2189:da71207a7cf1 libavformat

use new string functions based on patch by Reimar Dffinger
author mru
date Sat, 23 Jun 2007 23:10:32 +0000
parents eac986610f47
children 824d41f03283
line wrap: on
line diff
--- a/utils.c	Sat Jun 23 12:49:36 2007 +0000
+++ b/utils.c	Sat Jun 23 23:10:32 2007 +0000
@@ -21,6 +21,7 @@
 #include "avformat.h"
 #include "allformats.h"
 #include "opt.h"
+#include "avstring.h"
 
 #undef NDEBUG
 #include <assert.h>
@@ -362,7 +363,7 @@
         ic->pb = *pb;
     ic->duration = AV_NOPTS_VALUE;
     ic->start_time = AV_NOPTS_VALUE;
-    pstrcpy(ic->filename, sizeof(ic->filename), filename);
+    av_strlcpy(ic->filename, filename, sizeof(ic->filename));
 
     /* allocate private data */
     if (fmt->priv_data_size > 0) {
@@ -2840,7 +2841,7 @@
     }
     if (port_ptr)
         *port_ptr = port;
-    pstrcpy(path, path_size, p);
+    av_strlcpy(path, p, path_size);
 }
 
 void av_set_pts_info(AVStream *s, int pts_wrap_bits,