[FFmpeg-cvslog] pktdumper: Use a custom define instead of PATH_MAX for buffers

Martin Storsjö git at videolan.org
Fri Aug 31 13:39:11 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Aug 28 22:56:03 2012 +0300| [21411a4102757cb5ee9b4b16550a55055f54af8f] | committer: Martin Storsjö

pktdumper: Use a custom define instead of PATH_MAX for buffers

PATH_MAX is not necessarily available on all systems, e.g. it's
normally not available on MSVC, and is not guaranteed to defined
on a POSIX system either.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21411a4102757cb5ee9b4b16550a55055f54af8f
---

 tools/pktdumper.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/pktdumper.c b/tools/pktdumper.c
index f21a8e0..087ac5b 100644
--- a/tools/pktdumper.c
+++ b/tools/pktdumper.c
@@ -31,6 +31,8 @@
 #include <io.h>
 #endif
 
+#define FILENAME_BUF_SIZE 4096
+
 #include "libavutil/avstring.h"
 #include "libavutil/time.h"
 #include "libavformat/avformat.h"
@@ -49,8 +51,8 @@ static int usage(int ret)
 
 int main(int argc, char **argv)
 {
-    char fntemplate[PATH_MAX];
-    char pktfilename[PATH_MAX];
+    char fntemplate[FILENAME_BUF_SIZE];
+    char pktfilename[FILENAME_BUF_SIZE];
     AVFormatContext *fctx = NULL;
     AVPacket pkt;
     int64_t pktnum  = 0;



More information about the ffmpeg-cvslog mailing list