On Thu, 3 Dec 2015, Frediano Ziglio wrote:
[...]
> I think the exact simplification is
> 
> if (!bytes_per_sec) {
>   return 0;
> }
> return frame_size ? bytes_per_sec / frame_size : MJPEG_MAX_FPS;
> 
> You already noted that you used rounding instead or truncation;
> depending on the usage can be correct or not.

The function seems to be meant to return the maximum safe framerate so 
always rounding down may indeed be better. I resent the patch and added 
a note in the commit log for the bytes_per_sec == frame_size == 0 case.


-- 
Francois Gouget <[email protected]>

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to