[FFmpeg-devel] [PATCH 2/3] avformat/rtpproto: use av_dict_set_int() instead

lance.lmwang at gmail.com lance.lmwang at gmail.com
Mon May 25 16:00:22 EEST 2020


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavformat/rtpproto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 1f0a82ac7e..8b6c895222 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -301,8 +301,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
             goto fail;
         }
         if (s->ttl > 0) {
-            snprintf(buf, sizeof (buf), "%d", s->ttl);
-            av_dict_set(&fec_opts, "ttl", buf, 0);
+            av_dict_set_int(&fec_opts, "ttl", s->ttl, 0);
         }
     }
 
-- 
2.21.0



More information about the ffmpeg-devel mailing list