]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
update to libortp-0.10.0
authorAndre <maan@p133.(none)>
Thu, 15 Jun 2006 12:21:02 +0000 (14:21 +0200)
committerAndre <maan@p133.(none)>
Thu, 15 Jun 2006 12:29:53 +0000 (14:29 +0200)
Actually, this version of libortp seems to have a bug which causes
the ortp receiver to segfault. Fix seems to be simple and is already
sent out to the linphone mailing list.

Moreover, Simon made msg_to_buf() static ;(
An easy solution to this problem is to provide an own version in
ortp_recv.c.

NEWS
ortp_recv.c

diff --git a/NEWS b/NEWS
index dd02a36a05f48ddd36a5721ba434a4e8c55856fb..9750b12d32839b0cbf5da7f82c3aee0b8997e6d0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,15 +9,16 @@ A bunch of new features and core changes.
 
        - the new paraslash scheduler, short and sweet.
        - Support for m4a files via the new aac filter/ and audio
-         format handler. (requires libfaad)
+         format handler (requires libfaad).
+       - each writer has its own command line parser, just like
+         para_recv and para_filter.
        - new writer: osxplay (thanks to Gerd Becker)
+       - para_client and para_audioc use the error subsystem
        - writers are integrated in para_audiod
        - para_client is integrated in para_audiod
-       - each writer of para_write has its own command line parser,
-         just like para_recv and para_filter.
        - random/playlist selector: improved info strings
        - new audiod commands: tasks, kill
-       - para_client/para_audioc use the error subsystem
+       - update to libortp-0.10.0
 
 
 ------------------------------------------
index d9b260980e89f0a0c06d9de72cb390de0075aeef..12a990c3fc322f8be59f5ed12f19fe08381ec96b 100644 (file)
@@ -32,8 +32,6 @@
 
 #define CHUNK_SIZE 128 * 1024
 
-extern int msg_to_buf(mblk_t *, char *, int);
-
 /**
  * data specific to the ortp receiver
  *
@@ -67,6 +65,37 @@ uint32_t timestamp;
 uint32_t chunk_ts;
 };
 
+
+static int msg_to_buf(mblk_t *mp, char *buffer, int len)
+{
+       int rlen = len;
+       mblk_t *m, *mprev;
+       int mlen;
+
+       m = mp->b_cont;
+       mprev = mp;
+       while (m != NULL) {
+               mlen = (int) (m->b_wptr - m->b_rptr);
+               if (mlen <= rlen) {
+                       mblk_t *consumed = m;
+                       memcpy (buffer, m->b_rptr, mlen);
+                       /* go to next mblk_t */
+                       mprev->b_cont = m->b_cont;
+                       m = m->b_cont;
+                       consumed->b_cont = NULL;
+                       freeb (consumed);
+                       buffer += mlen;
+                       rlen -= mlen;
+               } else {  /*if mlen>rlen */
+                       memcpy (buffer, m->b_rptr, rlen);
+                       m->b_rptr += rlen;
+                       return len;
+               }
+       }
+       return len - rlen;
+}
+
+
 static void ortp_recv_pre_select(struct sched *s, struct task *t)
 {
        struct receiver_node *rn = t->private_data;