>From 91174fb40344e40fb0903e87b1a575abccb09d4e Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date: Sun, 1 May 2011 12:25:15 +0200
Subject: [PATCH] avstring: add definition for av_null_string

This will be useful for setting NULL values in context options.
---
 libavutil/avstring.c |    2 ++
 libavutil/avstring.h |    8 ++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index b573dd6..f63da7c 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -26,6 +26,8 @@
 #include "avstring.h"
 #include "mem.h"
 
+const char *av_null_string = "(null)";
+
 int av_strstart(const char *str, const char *pfx, const char **ptr)
 {
     while (*pfx && *pfx == *str) {
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index 04d1197..2c63773 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -24,6 +24,14 @@
 #include <stddef.h>
 
 /**
+ * String representing a null string, literal matches cannot be
+ * represented with such a string.
+ * This is mainly useful for setting a string option to the NULL
+ * value.
+ */
+extern const char *av_null_string;
+
+/**
  * Return non-zero if pfx is a prefix of str. If it is, *ptr is set to
  * the address of the first character in str after the prefix.
  *
-- 
1.7.2.3

