res = 0;
/* Get the translated frame but don't consume the original in case they're using it on another stream */
trf = ast_translate(fs->trans, f, 0);
- res = fs->fmt->write(fs, trf);
- if (res)
- ast_log(LOG_WARNING, "Translated frame write failed\n");
+ if (trf) {
+ res = fs->fmt->write(fs, trf);
+ if (res)
+ ast_log(LOG_WARNING, "Translated frame write failed\n");
+ } else
+ res = 0;
}
return res;
}
}
- return (c->softhangup ? -1 : 0);
+ return (c->_softhangup ? -1 : 0);
}