[Live-devel] [patch] remove unused null check and delete in JPEGVideoRTPSource.cpp

Erik Hovland erik at hovland.org
Tue Jul 1 16:25:28 PDT 2008


The function JPEGVideoRTPSource has a null check and delete for qtables.
But qtables is guaranteed to be null at this point. So the check and the
delete are not necessary.

---

 liveMedia/JPEGVideoRTPSource.cpp |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/liveMedia/JPEGVideoRTPSource.cpp b/liveMedia/JPEGVideoRTPSource.cpp
index 6a63a03..25e4981 100644
--- a/liveMedia/JPEGVideoRTPSource.cpp
+++ b/liveMedia/JPEGVideoRTPSource.cpp
@@ -394,8 +394,6 @@ Boolean JPEGVideoRTPSource
 
 	if (packetSize < resultSpecialHeaderSize + Length) return False;
 
-	if (qtables) delete [] qtables;
-
 	qtlen = Length;
 	qtables = &headerStart[resultSpecialHeaderSize];
 	

-- 
Erik Hovland
mail: erik at hovland.org
web: http://hovland.org/
PGP/GPG public key available on request



More information about the live-devel mailing list