mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Merge "translate: generic plc not filled in after translation" into 13
This commit is contained in:
@@ -56,6 +56,12 @@ static struct ast_frame *generic_read(struct ast_filestream *s, int *whennext, u
|
||||
static int slinear_write(struct ast_filestream *fs, struct ast_frame *f)
|
||||
{
|
||||
int res;
|
||||
|
||||
/* Don't try to write an interpolated frame */
|
||||
if (f->datalen == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
|
||||
ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user