diff options
Diffstat (limited to 'formats/format_pcm.c')
-rw-r--r-- | formats/format_pcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/formats/format_pcm.c b/formats/format_pcm.c index 118353552..3ecc1c16e 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -83,7 +83,7 @@ static struct ast_frame *pcm_read(struct ast_filestream *s, int *whennext) s->fr.subclass = s->fmt->format; s->fr.mallocd = 0; AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE); - if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) < 1) { + if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) { if (res) ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno)); return NULL; @@ -209,7 +209,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f) } #endif /* REALTIME_WRITE */ - if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) { + 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; } |