rust-ffmpeg icon indicating copy to clipboard operation
rust-ffmpeg copied to clipboard

Infinite loop on attempt to read the next packet with error "Connection reset by peer."

Open pyldin601 opened this issue 6 months ago • 0 comments

I am using my fork of this library, with an added log message in case of reading the next packet causes an error:

https://github.com/pyldin601/rust-ffmpeg/blob/master/src/format/context/input.rs#L183

This implementation attempts to reread the packet in a loop, which results in an infinite loop, repeatedly printing the following message:

Packet read error in a loop: Connection reset by peer.
Packet read error in a loop: Connection reset by peer.
Packet read error in a loop: Connection reset by peer.
Packet read error in a loop: Connection reset by peer.
...

I could do a PR with handling "Connection reset by peer." the same way as handling Error::Eof if it isn't intentional.

pyldin601 avatar Aug 11 '24 22:08 pyldin601