[FFmpeg-cvslog] matroskaenc: Fix type used for chapter timestamps

Vittorio Giovara git at videolan.org
Wed Mar 11 20:16:36 CET 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Wed Mar 11 14:56:52 2015 +0000| [9272c965d9559a90ee64d46aebd99c117e07f7a3] | committer: Vittorio Giovara

matroskaenc: Fix type used for chapter timestamps

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9272c965d9559a90ee64d46aebd99c117e07f7a3
---

 libavformat/matroskaenc.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index f4d2665..49e5bf3 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -917,11 +917,12 @@ static int mkv_write_chapters(AVFormatContext *s)
     for (i = 0; i < s->nb_chapters; i++) {
         ebml_master chapteratom, chapterdisplay;
         AVChapter *c     = s->chapters[i];
-        int chapterstart = av_rescale_q(c->start, c->time_base, scale);
-        int chapterend   = av_rescale_q(c->end,   c->time_base, scale);
+        int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale);
+        int64_t chapterend   = av_rescale_q(c->end,   c->time_base, scale);
         AVDictionaryEntry *t = NULL;
         if (chapterstart < 0 || chapterstart > chapterend || chapterend < 0) {
-            av_log(s, AV_LOG_ERROR, "Invalid chapter start (%d) or end (%d).\n",
+            av_log(s, AV_LOG_ERROR,
+                   "Invalid chapter start (%"PRId64") or end (%"PRId64").\n",
                    chapterstart, chapterend);
             return AVERROR_INVALIDDATA;
         }



More information about the ffmpeg-cvslog mailing list