peacepiece / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
GNU General Public License v3.0
0 stars 0 forks source link

Fix for H264Packetizer bug / ArrayIndexOutOfBoundsException #78

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start video transfer

What is the expected output? What do you see instead?

The Consumer in H264Packetizer stops creating RTP packets.

What version of the product are you using? On what operating system?

Spydroid 5.1

Please provide any additional information below.

The Consumer expects there to be at least 5 bytes in the FIFO per chunk, the 
NAL unit length and the NAL unit header. However, the Producer sometimes gets 
e.g. 2 byte chunks and happily places them in the FIFO.
This code will fix it, H264Packetizer line 149:

int nwrite=0;
while (sum < 5)  
{
    nwrite = fifo.write(is,100000);
    sum += nwrite;
}

Original issue reported on code.google.com by arno8...@gmail.com on 30 Nov 2012 at 8:17

GoogleCodeExporter commented 8 years ago
Indeed ! Thank you very much :)
There are people helping these days it's nice

Original comment by FyHertz on 30 Nov 2012 at 10:14