ffprobe: redesign json_escape_str(), to make use of a global buffer
authorStefano Sabatini <stefasab@gmail.com>
Fri, 14 Oct 2011 13:17:48 +0000 (15:17 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Tue, 18 Oct 2011 16:21:03 +0000 (18:21 +0200)
commit2f3b028c7117e03267ea7f88d0d612e70f1afc06
treee68d8bd0f432654daac82272d1e16d0ab0482e98
parent284aa07932264853dd645f62db9668774cbef2a1
ffprobe: redesign json_escape_str(), to make use of a global buffer

The new code avoids to call av_malloc/av_free when escaping is needed
(possibly faster), avoids an integer overflow in case of a huge
string, and provides feedback when a string cannot be escaped.

When a string cannot be escaped, a special string is printed instead.
ffprobe.c