Revision 016bc031 libavformat/rtpdec.c

View differences:

libavformat/rtpdec.c
531 531
    }
532 532
    av_free(s);
533 533
}
534

  
535
int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p,
536
                  int (*parse_fmtp)(AVStream *stream,
537
                                    PayloadContext *data,
538
                                    char *attr, char *value))
539
{
540
    char attr[256];
541
    char value[4096];
542
    int res;
543

  
544
    // remove protocol identifier
545
    while (*p && *p == ' ') p++; // strip spaces
546
    while (*p && *p != ' ') p++; // eat protocol identifier
547
    while (*p && *p == ' ') p++; // strip trailing spaces
548

  
549
    while (ff_rtsp_next_attr_and_value(&p,
550
                                       attr, sizeof(attr),
551
                                       value, sizeof(value))) {
552

  
553
        res = parse_fmtp(stream, data, attr, value);
554
        if (res < 0)
555
            return res;
556
    }
557
    return 0;
558
}

Also available in: Unified diff