[FFmpeg-cvslog] pp: check that the argument is not NULL as this is not supported

Michael Niedermayer git at videolan.org
Sat Jul 7 19:24:17 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jul  7 19:14:21 2012 +0200| [561a365dca6e392c5f6cd718784c57627819eef4] | committer: Michael Niedermayer

pp: check that the argument is not NULL as this is not supported

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libpostproc/postprocess.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 62eb3b2..2234ba8 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -728,6 +728,11 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
     struct PPMode *ppMode;
     char *filterToken;
 
+    if (!name)  {
+        av_log(NULL, AV_LOG_ERROR, "pp: Missing argument\n");
+        return NULL;
+    }
+
     if (!strcmp(name, "help")) {
         const char *p;
         for (p = pp_help; strchr(p, '\n'); p = strchr(p, '\n') + 1) {



More information about the ffmpeg-cvslog mailing list