On Tue, 9 Nov 2021 at 15:43, Yurii Monakov <[email protected]> wrote:

> You can add "timeout" to the options dictionary (avformat_open_input).
>
> AVDictionary* opt = 0;
> av_dict_set_int(&opt, "timeout", 1000000);
> avformat_open_input(..., &opt);
>
> For TCP this will set open/receive timeout to 1 second.
>
> Best Regards,
> Yurii
>
> Thank you, i had stimeout set in the dictionary, and have now included
timeout.  But it doesn't actually help:
if the connection is never started, then it aborts, but once started it
doesn't timeout after the connection has been made even if no new data is
being sent.

The real problem is that the server sends data, I receive it and decode
it.  The server stops sending data but maintains the connection.  The
server starts sending data again and the port is still open, but
av_read_frame has blocked, so nothing is done with the data that is sent.
How can I stop av_read_frame from blocking?

Regards,
Simon
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to