|
@@ -336,6 +336,7 @@ int av_escape(char **dst, const char *src, const char *special_chars, |
|
|
enum AVEscapeMode mode, int flags) |
|
|
enum AVEscapeMode mode, int flags) |
|
|
{ |
|
|
{ |
|
|
AVBPrint dstbuf; |
|
|
AVBPrint dstbuf; |
|
|
|
|
|
int ret; |
|
|
|
|
|
|
|
|
av_bprint_init(&dstbuf, 1, INT_MAX); /* (int)dstbuf.len must be >= 0 */ |
|
|
av_bprint_init(&dstbuf, 1, INT_MAX); /* (int)dstbuf.len must be >= 0 */ |
|
|
av_bprint_escape(&dstbuf, src, special_chars, mode, flags); |
|
|
av_bprint_escape(&dstbuf, src, special_chars, mode, flags); |
|
@@ -343,10 +344,10 @@ int av_escape(char **dst, const char *src, const char *special_chars, |
|
|
if (!av_bprint_is_complete(&dstbuf)) { |
|
|
if (!av_bprint_is_complete(&dstbuf)) { |
|
|
av_bprint_finalize(&dstbuf, NULL); |
|
|
av_bprint_finalize(&dstbuf, NULL); |
|
|
return AVERROR(ENOMEM); |
|
|
return AVERROR(ENOMEM); |
|
|
} else { |
|
|
|
|
|
av_bprint_finalize(&dstbuf, dst); |
|
|
|
|
|
return dstbuf.len; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
if ((ret = av_bprint_finalize(&dstbuf, dst)) < 0) |
|
|
|
|
|
return ret; |
|
|
|
|
|
return dstbuf.len; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int av_match_name(const char *name, const char *names) |
|
|
int av_match_name(const char *name, const char *names) |
|
|