]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/matroskaenc.c
avformat: Make AVChapter.id an int64_t on next major bump
[ffmpeg] / libavformat / matroskaenc.c
index 012da9e538251238b8f9eeff120151acad5698c2..bbf231f2a46900c309fa2e632c518f25a86372d8 100644 (file)
@@ -1669,7 +1669,11 @@ static int mkv_write_chapters(AVFormatContext *s)
         int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale);
         int64_t chapterend   = av_rescale_q(c->end,   c->time_base, scale);
         const AVDictionaryEntry *t;
+#if FF_API_CHAPTER_ID_INT
         uint64_t uid = create_new_ids ? i + 1ULL : (uint32_t)c->id;
+#else
+        uint64_t uid = create_new_ids ? i + 1ULL : c->id;
+#endif
         if (chapterstart < 0 || chapterstart > chapterend || chapterend < 0) {
             av_log(s, AV_LOG_ERROR,
                    "Invalid chapter start (%"PRId64") or end (%"PRId64").\n",