projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e2c92b
)
More accurate video pts calculation; may help with #1663.
author
Carl Hetherington
<cth@carlh.net>
Sat, 30 Nov 2019 21:38:21 +0000
(21:38 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 30 Nov 2019 21:38:21 +0000
(21:38 +0000)
src/lib/ffmpeg_file_encoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_file_encoder.cc
b/src/lib/ffmpeg_file_encoder.cc
index abde0c153f433a754fc77c2ac253cfe2bdac67af..294b031621b91076606bc716b273096ade261d61 100644
(file)
--- a/
src/lib/ffmpeg_file_encoder.cc
+++ b/
src/lib/ffmpeg_file_encoder.cc
@@
-260,7
+260,8
@@
FFmpegFileEncoder::video (shared_ptr<PlayerVideo> video, DCPTime time)
frame->width = image->size().width;
frame->height = image->size().height;
frame->format = _pixel_format;
- frame->pts = time.seconds() / av_q2d (_video_stream->time_base);
+ DCPOMATIC_ASSERT (_video_stream->time_base.num == 1);
+ frame->pts = time.get() * _video_stream->time_base.den / DCPTime::HZ;
AVPacket packet;
av_init_packet (&packet);