[Red5commits] [1613] Buffer enhancement contributed by Daniel Daley. (APPSERVER-8)

sgong luke at codegent.com
Wed Jan 24 11:07:56 EST 2007


Buffer enhancement contributed by Daniel Daley. (APPSERVER-8)


Timestamp: 01/15/07 08:49:10 EST (1 week ago) 
Change: 1613 
Author: sgong

Files (see diff or trac for details): 
java/server/trunk/src/org/red5/io/flv/impl/FLVReader.java


Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/1613

Index: /java/server/trunk/src/org/red5/io/flv/impl/FLVReader.java
===================================================================
--- /java/server/trunk/src/org/red5/io/flv/impl/FLVReader.java (revision 1609)
+++ /java/server/trunk/src/org/red5/io/flv/impl/FLVReader.java (revision 1613)
@@ -296,11 +296,6 @@
 				}
 
-				java.nio.ByteBuffer tmpbuf = java.nio.ByteBuffer.allocate((int) toRead);
-				channel.read(tmpbuf);
-				tmpbuf.flip();
-				in.put(tmpbuf);
+				channel.read(in.buf());
 				in.flip();
-                // Let GC sweep it
-                tmpbuf = null;
 			}
 


Note:
Diffs are chopped if more than 25k.
This is to get past the limit on the mailing list.



More information about the Red5commits mailing list