[FFmpeg-devel] [PATCH 2/3] libavformat/libopenmpt: Actually set stream duration and fix the confusion around the used time base.

Jörn Heusipp osmanx at problemloesungsmaschine.de
Sun Jul 17 16:37:13 EEST 2016


Signed-off-by: Jörn Heusipp <osmanx at problemloesungsmaschine.de>
---
 libavformat/libopenmpt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index 58a02be..7b1dd5b 100644
--- a/libavformat/libopenmpt.c
+++ b/libavformat/libopenmpt.c
@@ -94,9 +94,8 @@ static int read_header_openmpt(AVFormatContext *s)
         openmpt->module = NULL;
         return AVERROR(ENOMEM);
     }
-    avpriv_set_pts_info(st, 64, 1, 1000);
-    if (st->duration > 0)
-        st->duration = llrint(openmpt->duration*AV_TIME_BASE);
+    avpriv_set_pts_info(st, 64, 1, AV_TIME_BASE);
+    st->duration = llrint(openmpt->duration*AV_TIME_BASE);
 
     st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
     st->codecpar->codec_id    = AV_NE(AV_CODEC_ID_PCM_F32BE, AV_CODEC_ID_PCM_F32LE);
-- 
1.9.1



More information about the ffmpeg-devel mailing list