[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-users] str_utils.c assertion, #2
From: |
Ilya Melnikov |
Subject: |
Re: [Linphone-users] str_utils.c assertion, #2 |
Date: |
Wed, 04 Jun 2014 22:11:17 +0600 |
User-agent: |
KMail/4.8.5 (Linux/3.5.0-49-generic; KDE/4.8.5; x86_64; ; ) |
Made a "dirty" patch (see below).
This patch makes Linphone work well with virtual webcam. It doesn't crash any
more on line "prev->b_cont=mp;". But of course this patch is made hastily.
Could you fix "dupmsg" in correct way?
=== begin patch ===
--- linphone-3.7.0.orig/mediastreamer2/src/videofilters/msv4l2.c
+++ linphone-3.7.0/mediastreamer2/src/videofilters/msv4l2.c
@@ -438,10 +438,12 @@ static void *msv4l2_thread(void *ptr){
m=v4lv2_grab_image(s,50);
if (m){
mblk_t *om=dupmsg(m);
- mblk_set_marker_info(om,(s->pix_fmt==MS_MJPEG));
- ms_mutex_lock(&s->mutex);
- putq(&s->rq,om);
- ms_mutex_unlock(&s->mutex);
+ if (om!=NULL){
+
mblk_set_marker_info(om,(s->pix_fmt==MS_MJPEG));
+ ms_mutex_lock(&s->mutex);
+ putq(&s->rq,om);
+ ms_mutex_unlock(&s->mutex);
+ }
}
}
}
--- linphone-3.7.0.orig/oRTP/src/str_utils.c
+++ linphone-3.7.0/oRTP/src/str_utils.c
@@ -150,6 +150,7 @@ mblk_t *dupmsg(mblk_t* m)
{
mblk_t *newm=NULL,*mp,*prev;
prev=newm=dupb(m);
+ return_val_if_fail(prev!=NULL,NULL);
m=m->b_cont;
while (m!=NULL){
mp=dupb(m);
=== end patch ===
--
Ilya Melnikov
Wednesday 04 June 2014 22:02:53
signature.asc
Description: This is a digitally signed message part.