In case of short marker, the number of received packets was not
incremented doing a zero divide when computing the filling rate.
Reported-by: Hans Petter Selasky <[email protected]>
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* not the JPEG end of frame ('ff d9').
*/
+ /* count the packets and their size */
+ sd->npkt++;
+ sd->pktsz += len;
+
/*fixme: assumption about the following code:
* - there can be only one marker in a packet
*/
data += i;
}
- /* count the packets and their size */
- sd->npkt++;
- sd->pktsz += len;
-
/* search backwards if there is a marker in the packet */
for (i = len - 1; --i >= 0; ) {
if (data[i] != 0xff) {