diff mbox series

[FFmpeg-devel,1/3] avformat/rtspdec: use av_dict_set_int() instead

Message ID 1590411623-30517-1-git-send-email-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/3] avformat/rtspdec: use av_dict_set_int() instead
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Limin Wang May 25, 2020, 1 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

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

Comments

Anton Khirnov May 27, 2020, 8:06 a.m. UTC | #1
>[FFmpeg-devel] [PATCH 1/3] avformat/rtspdec: use av_dict_set_int()	instead
doesn't make sense: instead of what?

Something like
avformat/rtspdec: av_dict_set() -> av_dict_set_int()
would be more clear IMO
Limin Wang May 27, 2020, 10:18 a.m. UTC | #2
On Wed, May 27, 2020 at 10:06:59AM +0200, Anton Khirnov wrote:
> >[FFmpeg-devel] [PATCH 1/3] avformat/rtspdec: use av_dict_set_int()	instead
> doesn't make sense: instead of what?
> 
> Something like
> avformat/rtspdec: av_dict_set() -> av_dict_set_int()
> would be more clear IMO

Yes, it's more clear, I'll update the patch.


> 
> -- 
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index bd2e8f47f1..dfa29913bf 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -289,9 +289,7 @@  static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl)
     } else {
         do {
             AVDictionary *opts = NULL;
-            char buf[256];
-            snprintf(buf, sizeof(buf), "%d", rt->buffer_size);
-            av_dict_set(&opts, "buffer_size", buf, 0);
+            av_dict_set_int(&opts, "buffer_size", rt->buffer_size, 0);
             ff_url_join(url, sizeof(url), "rtp", NULL, host, localport, NULL);
             av_log(s, AV_LOG_TRACE, "Opening: %s", url);
             ret = ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,