]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ffmetadec.c
Merge remote branch 'qatar/master'
[ffmpeg] / libavformat / ffmetadec.c
index cfeed7353c687db6d563d02a5df1582484fc8a8a..a8bffa09af006589baa6aa67ea5905f2e6ccd8c6 100644 (file)
@@ -30,17 +30,17 @@ static int probe(AVProbeData *p)
     return 0;
 }
 
-static void get_line(ByteIOContext *s, uint8_t *buf, int size)
+static void get_line(AVIOContext *s, uint8_t *buf, int size)
 {
     do {
         uint8_t c;
         int i = 0;
 
-        while ((c = get_byte(s))) {
+        while ((c = avio_r8(s))) {
             if (c == '\\') {
                 if (i < size - 1)
                     buf[i++] = c;
-                c = get_byte(s);
+                c = avio_r8(s);
             } else if (c == '\n')
                 break;
 
@@ -61,14 +61,14 @@ static AVChapter *read_chapter(AVFormatContext *s)
 
     if (sscanf(line, "TIMEBASE=%d/%d", &tb.num, &tb.den))
         get_line(s->pb, line, sizeof(line));
-    if (!sscanf(line, "START=%lld", &start)) {
+    if (!sscanf(line, "START=%"SCNd64, &start)) {
         av_log(s, AV_LOG_ERROR, "Expected chapter start timestamp, found %s.\n", line);
         start = (s->nb_chapters && s->chapters[s->nb_chapters - 1]->end != AV_NOPTS_VALUE) ?
                  s->chapters[s->nb_chapters - 1]->end : 0;
     } else
         get_line(s->pb, line, sizeof(line));
 
-    if (!sscanf(line, "END=%lld", &end)) {
+    if (!sscanf(line, "END=%"SCNd64, &end)) {
         av_log(s, AV_LOG_ERROR, "Expected chapter end timestamp, found %s.\n", line);
         end = AV_NOPTS_VALUE;
     }