diff mbox

[FFmpeg-devel,2/7] dashenc: use av_dict_set_int instead of static function

Message ID 20171026155840.16816-3-pegro@friiks.de
State Accepted
Commit 3606c114172ec0cb25660b4c2e146bed5b211ba3
Headers show

Commit Message

Peter Große Oct. 26, 2017, 3:58 p.m. UTC
Signed-off-by: Peter Große <pegro@friiks.de>
---
 libavformat/dashenc.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Comments

Michael Niedermayer Oct. 28, 2017, 1:08 a.m. UTC | #1
On Thu, Oct 26, 2017 at 05:58:35PM +0200, Peter Große wrote:
> Signed-off-by: Peter Große <pegro@friiks.de>
> ---
>  libavformat/dashenc.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)

will apply

thanks

[...]
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index a4b37403d6..1b3acb7ac9 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -664,14 +664,6 @@  static int dict_copy_entry(AVDictionary **dst, const AVDictionary *src, const ch
     return 0;
 }
 
-static int dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
-{
-    char valuestr[22];
-    snprintf(valuestr, sizeof(valuestr), "%"PRId64, value);
-    flags &= ~AV_DICT_DONT_STRDUP_VAL;
-    return av_dict_set(pm, key, valuestr, flags);
-}
-
 static int dash_init(AVFormatContext *s)
 {
     DASHContext *c = s->priv_data;
@@ -782,8 +774,8 @@  static int dash_init(AVFormatContext *s)
         if (!strcmp(os->format_name, "mp4")) {
             av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
         } else {
-            dict_set_int(&opts, "cluster_time_limit", c->min_seg_duration / 1000, 0);
-            dict_set_int(&opts, "cluster_size_limit", 5 * 1024 * 1024, 0); // set a large cluster size limit
+            av_dict_set_int(&opts, "cluster_time_limit", c->min_seg_duration / 1000, 0);
+            av_dict_set_int(&opts, "cluster_size_limit", 5 * 1024 * 1024, 0); // set a large cluster size limit
         }
         if ((ret = avformat_write_header(ctx, &opts)) < 0)
             return ret;