It makes the intent clearer and avoids calculating the length
in advance.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
goto fail;
}
if (up->priv_data_class) {
- int proto_len= strlen(up->name);
- char *start = strchr(uc->filename, ',');
+ char *start;
*(const AVClass **)uc->priv_data = up->priv_data_class;
av_opt_set_defaults(uc->priv_data);
- if(!strncmp(up->name, uc->filename, proto_len) && uc->filename + proto_len == start){
+ if (av_strstart(uc->filename, up->name, (const char**)&start) && *start == ',') {
int ret= 0;
char *p= start;
char sep= *++p;