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

Marton Balint cus at passwd.hu
Wed Sep 20 03:01:01 EEST 2017



On Wed, 20 Sep 2017, Carl Eugen Hoyos wrote:

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

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... 
Yeah, I know it requires some additional changes in the code, but not too 
much I assume.

Regards,
Marton




More information about the ffmpeg-devel mailing list