Pass time_base as argument to new_chapter() as well.
[ffmpeg.git] / libavformat / matroskadec.c
index 7cbf705..6f6caa1 100644 (file)
@@ -2254,10 +2254,7 @@ matroska_parse_chapters(AVFormatContext *s)
                     }
 
                     if (start != AV_NOPTS_VALUE && uid != -1) {
-                        start = start * AV_TIME_BASE / 1000000000;
-                        if (end != AV_NOPTS_VALUE)
-                            end = end * AV_TIME_BASE / 1000000000;
-                        if(!ff_new_chapter(s, uid, start, end, title))
+                        if(!ff_new_chapter(s, uid, (AVRational){1, 1000000000}, start, end, title))
                             res= AVERROR(ENOMEM);
                     }
                     av_free(title);