You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
ccsnake
changed the title
Why disable socket timeout temporarily when FormatContext::findStreamInfo?
Why disable socket timeout temporarily in FormatContext::findStreamInfo?
Feb 1, 2021
I analyse code. av_find_stream_info() is a complex function that some times requires so much time for internal work. FormatContext::setTimeout() useful for simple cases and mainly targeted for use with FormatContext::readPacket(). For complex cases you should use FormatContext::setInterruptCallback(). In such way, you can setup some flag, that your callback check and return 1 if findStreamInfo is timed out.
In any case, socketTimeout() is not a good choose for this option name... Maybe frameReadTimeout() is better.
This will block in some cases.
thx
The text was updated successfully, but these errors were encountered: