question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

32-bit integer overflow when calling Stream.getBitRate

See original GitHub issue

Hi @kokorin,

I’m getting a NumberFormatException when calling getBitRate() on a probed Stream (for very high bitrate videos like e.g. UHD 8K).

For example:

Failed to parse integer number: 2498657137

An upgrade from Integer to Long would fix this it seems.

Cheers, -Jon

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kokorincommented, Sep 16, 2019

Hi @jonfryd , Version 0.9.2 has been released. contains fixes for bitrate-related properties. Also now it’s possible to supply InputStream and SeekableByteChannel to FFprobe.

Best regards, Denis Kokorin.

1reaction
kokorincommented, Aug 28, 2019

BTW, you can use a workaround:

FFprobeResult probe = ...
Stream stream = probe.getStreams().get(0);
Long bitrate = stream.getSection().getLong("bit_rate");
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I detect integer overflow on 32 bits int? - java
The most intuitive method I can think of: calculate the sum (or difference) as a long , then convert that sum to an...
Read more >
Integer overflow: How does it occur and how can it be ...
Let's consider an integer type called a long. For the MSVC compiler, a long consumes 32 bits regardless of whether the build is...
Read more >
What is an Integer Overflow Attack (with Examples)?
Integer overflow attacks involve exploiting bugs in software. When these integer overflow flaws are abused, it can lead to disastrous ...
Read more >
Integer overflow - Wikipedia
In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range...
Read more >
My net worth caused an integer overflow (2111 more than ...
Therefore, a 17-bit (not 32-bit) signed integer gives you basically the same maximum positive number as a 16-bit unsigned integer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found