Closed prodemydotcom closed 2 weeks ago
When the bitrate is set to a value up to 255, the API response is correct: REST API URL: http://127.0.0.1:5000/api/v4/bitrate
http://127.0.0.1:5000/api/v4/bitrate
{ "command": "bitrate", "payload": null, "response": 255, "status": "success", "value": 255 }
However, setting the bitrate to any value over 255 causes an overflow: REST API URL: http://127.0.0.1:5000/api/v4/bitrate/288
http://127.0.0.1:5000/api/v4/bitrate/288
{ "command": "bitrate", "payload": "288", "status": "success", "value": 288 }
The API reports success, but querying the current bitrate shows an incorrect value due to overflow: REST API URL: http://127.0.0.1:5000/api/v4/bitrate
{ "command": "bitrate", "payload": null, "response": 32, "status": "success", "value": 32 }
The value 32 is the result of overflow, as 288 wraps around within an 8-bit limit (255 + 32 + 1 = 288).
This overflow causes wyze-bridge to repeatedly attempt to correct the bitrate:
wyze-bridge | [v4] bitrate=32 does not match 288 wyze-bridge | [v4] Requesting frame_size=3, bitrate=288, fps=0
Wyze-bridge should handle the overflow correctly and not attempt to correct the bitrate if the issue is due to overflow.
Thank you for looking into this issue!
Sorry, I'm unable to replicate. Please ensure you're running the latest version of the bridge.
Can confirm latest version does not have this issue. Thank you!
Describe the Bug
When the bitrate is set to a value up to 255, the API response is correct: REST API URL:
http://127.0.0.1:5000/api/v4/bitrate
However, setting the bitrate to any value over 255 causes an overflow: REST API URL:
http://127.0.0.1:5000/api/v4/bitrate/288
The API reports success, but querying the current bitrate shows an incorrect value due to overflow: REST API URL:
http://127.0.0.1:5000/api/v4/bitrate
The value 32 is the result of overflow, as 288 wraps around within an 8-bit limit (255 + 32 + 1 = 288).
This overflow causes wyze-bridge to repeatedly attempt to correct the bitrate:
Expected Behavior
Wyze-bridge should handle the overflow correctly and not attempt to correct the bitrate if the issue is due to overflow.
Environment
Thank you for looking into this issue!