- PARA_DEBUG_LOG("fc %p loaded: %zd, calling %s convert\n", fci, *loaded, fn->filter->name);
- ret = fn->filter->convert(ib, *loaded, fn);
- if (ret < 0) {
- if (!fci->error)
- fci->error = -ret;
- return ret;
- }
- call_callbacks(fn, ib, ret, fn->buf + old_fn_loaded, fn->loaded - old_fn_loaded);
- *loaded -= ret;
- conv += ret;
- if (*loaded && ret) {
- PARA_DEBUG_LOG("moving %zd bytes in input buffer for %s filter\n",
- *loaded, fn->filter->name);
- memmove(ib, ib + ret, *loaded);
+// PARA_DEBUG_LOG("fc %p loaded: %zd, calling %s convert\n",
+// fc, *loaded, fn->filter->name);
+ t->ret = fn->filter->convert(ib, *loaded, fn);
+ if (t->ret < 0)
+ goto err_out;
+ call_callbacks(fn, ib, t->ret, fn->buf + old_fn_loaded,
+ fn->loaded - old_fn_loaded);
+ *loaded -= t->ret;
+ conv += t->ret;
+ if (*loaded && t->ret) {
+// PARA_DEBUG_LOG("moving %zd bytes in input "
+// "buffer for %s filter\n",
+// *loaded, fn->filter->name);
+ memmove(ib, ib + t->ret, *loaded);