diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-04-08 20:13:57 +0200 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-04-08 20:13:57 +0200 |
commit | 6641895c3641e792de6f16a9967bc2becfb513a4 (patch) | |
tree | 96bfd8bcc717fa54f30657dccca2e64c50e7a238 /modules | |
parent | dcd6d24ee1fa7bbc14f363ae43a579f1db9f01a2 (diff) |
dshow: convert sample_time to timestamp
Diffstat (limited to 'modules')
-rw-r--r-- | modules/dshow/dshow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/dshow/dshow.cpp b/modules/dshow/dshow.cpp index d081f69..46aef3e 100644 --- a/modules/dshow/dshow.cpp +++ b/modules/dshow/dshow.cpp @@ -99,12 +99,13 @@ public: STDMETHOD(BufferCB) (double sample_time, BYTE *buf, long buf_len) { struct vidframe vidframe; + uint64_t timestamp = sample_time * VIDEO_TIMEBASE; /* XXX: should be VID_FMT_BGR24 */ vidframe_init_buf(&vidframe, VID_FMT_RGB32, &src->size, buf); if (src->frameh) - src->frameh(&vidframe, src->arg); + src->frameh(&vidframe, timestamp, src->arg); return S_OK; } |