Revision ab0287fc libavformat/utils.c

View differences:

libavformat/utils.c
3391 3391
}
3392 3392
#endif
3393 3393

  
3394
#if FF_API_FIND_INFO_TAG
3395
#include "libavutil/parseutils.h"
3396

  
3394 3397
int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info)
3395 3398
{
3396
    const char *p;
3397
    char tag[128], *q;
3398

  
3399
    p = info;
3400
    if (*p == '?')
3401
        p++;
3402
    for(;;) {
3403
        q = tag;
3404
        while (*p != '\0' && *p != '=' && *p != '&') {
3405
            if ((q - tag) < sizeof(tag) - 1)
3406
                *q++ = *p;
3407
            p++;
3408
        }
3409
        *q = '\0';
3410
        q = arg;
3411
        if (*p == '=') {
3412
            p++;
3413
            while (*p != '&' && *p != '\0') {
3414
                if ((q - arg) < arg_size - 1) {
3415
                    if (*p == '+')
3416
                        *q++ = ' ';
3417
                    else
3418
                        *q++ = *p;
3419
                }
3420
                p++;
3421
            }
3422
        }
3423
        *q = '\0';
3424
        if (!strcmp(tag, tag1))
3425
            return 1;
3426
        if (*p != '&')
3427
            break;
3428
        p++;
3429
    }
3430
    return 0;
3399
    return av_find_info_tag(arg, arg_size, tag1, info);
3431 3400
}
3401
#endif
3432 3402

  
3433 3403
int av_get_frame_filename(char *buf, int buf_size,
3434 3404
                          const char *path, int number)

Also available in: Unified diff