[FFmpeg-devel] lavf/rtsp: Allow to set SDP timeout.

Submitted by Marton Balint on Sept. 20, 2017, 12:01 a.m.

Details

Message ID alpine.LSU.2.20.1709200158460.30211@iq
State New
Headers show

Commit Message

Marton Balint Sept. 20, 2017, 12:01 a.m.
On Wed, 20 Sep 2017, Carl Eugen Hoyos wrote:

> Hi!
>
> Attached patch fixes part of ticket #2415.
>
> Please comment, Carl Eugen
>

Yeah, I know it requires some additional changes in the code, but not too 
much I assume.

Regards,
Marton

Patch hide | download patch | download mbox

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 0bd72dc..c8fa26a 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -104,6 +104,7 @@  static const AVOption sdp_options[] = {
      RTSP_FLAG_OPTS("sdp_flags", "SDP flags"),
      { "custom_io", "use custom I/O", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_CUSTOM_IO}, 0, 0, DEC, "rtsp_flags" },
      { "rtcp_to_source", "send RTCP packets to the source address of received packets", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_RTCP_TO_SOURCE}, 0, 0, DEC, "rtsp_flags" },
+    { "timeout", "set timeout (in tenths of a seconds)", OFFSET(initial_timeout), AV_OPT_TYPE_INT, {.i64 = MAX_TIMEOUTS}, 0, 1000000, DEC },

I'd prefer AV_OPT_TYPE_DURATION for every new duration-like option, it is 
already messy where you need to specify milisecs, microsecs, or seconds...