OSDN Git Service

avformat/dashenc: fix format string generation
authorRodger Combs <rodger.combs@gmail.com>
Wed, 21 Jan 2015 15:36:53 +0000 (09:36 -0600)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Jan 2015 10:55:21 +0000 (11:55 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/dashenc.c

index e3e68c4..d7b2583 100644 (file)
@@ -282,7 +282,7 @@ static DASHTmplId dash_read_tmpl_id(const char *identifier, char *format_tag,
         // next parse the dash format-tag and generate a c-string format tag
         // (next_ptr now points at the first '%' at the beginning of the format-tag)
         if (id_type != DASH_TMPL_ID_UNDEFINED) {
-            const char *number_format = DASH_TMPL_ID_TIME ? "lld" : "d";
+            const char *number_format = (id_type == DASH_TMPL_ID_TIME) ? "lld" : "d";
             if (next_ptr[0] == '$') { // no dash format-tag
                 snprintf(format_tag, format_tag_size, "%%%s", number_format);
                 *ptr = &next_ptr[1];