patch-channels_chan_oss_c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --- asterisk-1.4.27.1.orig/channels/chan_oss.c 2009-08-10 21:15:57.000000000 +0200
  2. +++ asterisk-1.4.27.1/channels/chan_oss.c 2009-12-03 20:58:13.000000000 +0100
  3. @@ -562,7 +562,7 @@ static void send_sound(struct chan_oss_p
  4. l = FRAME_SIZE - ofs;
  5. if (l > s->datalen - start) /* don't overflow the source */
  6. l = s->datalen - start;
  7. - bcopy(s->data + start, myframe + ofs, l * 2);
  8. + memcpy(myframe + ofs, s->data + start, l * 2);
  9. if (0)
  10. ast_log(LOG_WARNING, "send_sound sound %d/%d of %d into %d\n", l_sampsent, l, s->samplen, ofs);
  11. l_sampsent += l;
  12. @@ -573,14 +573,14 @@ static void send_sound(struct chan_oss_p
  13. if (l > 0) {
  14. if (l > FRAME_SIZE - ofs)
  15. l = FRAME_SIZE - ofs;
  16. - bcopy(silence, myframe + ofs, l * 2);
  17. + memcpy(myframe + ofs, silence, l * 2);
  18. l_sampsent += l;
  19. } else { /* silence is over, restart sound if loop */
  20. if (s->repeat == 0) { /* last block */
  21. o->cursound = -1;
  22. o->nosound = 0; /* allow audio data */
  23. if (ofs < FRAME_SIZE) /* pad with silence */
  24. - bcopy(silence, myframe + ofs, (FRAME_SIZE - ofs) * 2);
  25. + memcpy(myframe + ofs, silence, (FRAME_SIZE - ofs) * 2);
  26. }
  27. l_sampsent = 0;
  28. }
  29. @@ -905,7 +905,7 @@ static struct ast_frame *oss_read(struct
  30. /* XXX can be simplified returning &ast_null_frame */
  31. /* prepare a NULL frame in case we don't have enough data to return */
  32. - bzero(f, sizeof(struct ast_frame));
  33. + memset(f, 0, sizeof(struct ast_frame));
  34. f->frametype = AST_FRAME_NULL;
  35. f->src = oss_tech.type;