[svn-commits] file: branch 1.4 r66437 - /branches/1.4/main/rtp.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 29 09:44:34 MST 2007


Author: file
Date: Tue May 29 11:44:34 2007
New Revision: 66437

URL: http://svn.digium.com/view/asterisk?view=rev&rev=66437
Log:
Handle cases where a frame may have no data. (issue #9519 reported by dmb)

Modified:
    branches/1.4/main/rtp.c

Modified: branches/1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/rtp.c?view=diff&rev=66437&r1=66436&r2=66437
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Tue May 29 11:44:34 2007
@@ -2743,7 +2743,7 @@
 			ast_smoother_feed(rtp->smoother, _f);
 		}
 
-		while((f = ast_smoother_read(rtp->smoother)))
+		while((f = ast_smoother_read(rtp->smoother)) && (f->data))
 			ast_rtp_raw_write(rtp, f, codec);
 	} else {
 	        /* Don't buffer outgoing frames; send them one-per-packet: */
@@ -2752,7 +2752,8 @@
 		} else {
 			f = _f;
 		}
-		ast_rtp_raw_write(rtp, f, codec);
+		if (f->data)
+			ast_rtp_raw_write(rtp, f, codec);
 		if (f != _f)
 			ast_frfree(f);
 	}



More information about the svn-commits mailing list