diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-16 09:52:38 +0100 |
---|---|---|
committer | Janne Grunau <janne-ffmpeg@jannau.net> | 2011-02-17 15:35:18 +0100 |
commit | ab0287fcbdebc8ff416214535d7ee8424406990e (patch) | |
tree | 48491346ba91fc472e3dc9dbef4b72a94fbef068 /libavformat/utils.c | |
parent | 979395bbbb9381b522b44c3448c24aef9c819ffc (diff) | |
download | ffmpeg-ab0287fcbdebc8ff416214535d7ee8424406990e.tar.gz |
Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index acac406bf6..04062a0f00 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3391,44 +3391,14 @@ int64_t parse_date(const char *timestr, int duration) } #endif +#if FF_API_FIND_INFO_TAG +#include "libavutil/parseutils.h" + int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info) { - const char *p; - char tag[128], *q; - - p = info; - if (*p == '?') - p++; - for(;;) { - q = tag; - while (*p != '\0' && *p != '=' && *p != '&') { - if ((q - tag) < sizeof(tag) - 1) - *q++ = *p; - p++; - } - *q = '\0'; - q = arg; - if (*p == '=') { - p++; - while (*p != '&' && *p != '\0') { - if ((q - arg) < arg_size - 1) { - if (*p == '+') - *q++ = ' '; - else - *q++ = *p; - } - p++; - } - } - *q = '\0'; - if (!strcmp(tag, tag1)) - return 1; - if (*p != '&') - break; - p++; - } - return 0; + return av_find_info_tag(arg, arg_size, tag1, info); } +#endif int av_get_frame_filename(char *buf, int buf_size, const char *path, int number) |