changeset 453:a699cf5c703d libavformat

NULL pointers ...
author michael
date Tue, 27 Apr 2004 02:55:05 +0000
parents 11d07f14b077
children 7fa377b2f533
files utils.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Apr 26 22:16:06 2004 +0000
+++ b/utils.c	Tue Apr 27 02:55:05 2004 +0000
@@ -48,6 +48,9 @@
     const char *ext, *p;
     char ext1[32], *q;
 
+    if(!filename)
+        return 0;
+    
     ext = strrchr(filename, '.');
     if (ext) {
         ext++;
@@ -264,6 +267,8 @@
 int filename_number_test(const char *filename)
 {
     char buf[1024];
+    if(!filename)
+        return -1;
     return get_frame_filename(buf, sizeof(buf), filename, 1);
 }