Hi
i follow below step to set UDP socket timeout of 5 seconds.
AVDictionary *stream_opts = 0;
av_dict_set(&stream_opts, "timeout", 3000000) // in microseconds.
avformat_open_input ( &myContext, "<myIPAddr", NULL, &stream_opts);
by default, av_read_frame () takes 20 Seconds for timeout, in case RTSP
goes out of network. [ socket.h:#define SO_RCVTIMEO 20 ]
which is very clearly indicates, the value which is set has no impact.
I am not sure if there are any quirk which i need to be aware of ?
is it the right way ?
Also from udp.c
{"timeout", "In read mode: if no data arrived in more than this time
interval, raise error", OFFSET(timeout), AV_OPT_TYPE_INT, {.i64 = 0}, 0,
INT_MAX, D }
596 if (!is_output && av_find_info_tag(buf, sizeof(buf), "timeout",
p))
597 s->timeout = strtol(buf, NULL, 10);
606 h->rw_timeout = s->timeout;
*I am unable to locate the interesting part of where UDP socket is
configured with h->rw_timeout ?*
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user