- ff_add_format(&formats, c->sample_fmt);
- ff_set_common_formats(ctx, formats);
-
- ff_add_format(&samplerates, c->sample_rate);
- ff_set_common_samplerates(ctx, samplerates);
+ if ((ret = ff_add_format (&formats , c->sample_fmt )) < 0 ||
+ (ret = ff_set_common_formats (ctx , formats )) < 0 ||
+ (ret = ff_add_format (&samplerates, c->sample_rate)) < 0 ||
+ (ret = ff_set_common_samplerates (ctx , samplerates )) < 0)
+ return ret;