diff options
author | Sven Göthel <[email protected]> | 2024-01-28 22:01:28 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-28 22:01:28 +0100 |
commit | 3e95c1994d363bc137ffcf548fd3751ac500ac7b (patch) | |
tree | 29aaef978ce7db146a0c80c25a3c36c771b7e49d /src/jogl/native | |
parent | c5bca1f0dba2540088e8e2a90d720fdbc4870b30 (diff) |
FFMPEGMediaPlayer/GraphUI MediaButton: AVSubtitles's start/end are relative to pts [ms] (fixed); Use ASSEventLine packets within proper pts only.
Diffstat (limited to 'src/jogl/native')
-rw-r--r-- | src/jogl/native/libav/ffmpeg_impl_template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/native/libav/ffmpeg_impl_template.c b/src/jogl/native/libav/ffmpeg_impl_template.c index d6a251c07..5261c8443 100644 --- a/src/jogl/native/libav/ffmpeg_impl_template.c +++ b/src/jogl/native/libav/ffmpeg_impl_template.c @@ -1804,8 +1804,8 @@ JNIEXPORT jint JNICALL FF_FUNC(readNextPacket0) int32_t sPTS=-1, sStart=-1, sEnd=-1; if( AV_NOPTS_VALUE != sub.pts ) { sPTS = my_av_q2i32( sub.pts * 1000, AV_TIME_BASE_Q); - sStart = my_av_q2i32( ( sub.pts + sub.start_display_time ) * 1000, AV_TIME_BASE_Q); - sEnd = my_av_q2i32( ( sub.pts + sub.end_display_time ) * 1000, AV_TIME_BASE_Q); + sStart = sPTS + sub.start_display_time; + sEnd = sPTS + sub.end_display_time; } for(unsigned int i=0; i<sub.num_rects; ++i) { AVSubtitleRect* r = sub.rects[i]; |