[FFmpeg-devel] [PATCH 1/2] avdevice/dshow: query graph time only once
Diederick Niehorster
dcnieho at gmail.com
Wed Jun 2 14:48:31 EEST 2021
No need to query twice, use value we've already unconditionally got.
Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
---
libavdevice/dshow_pin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index ee0d4a1b42..8408af26da 100644
--- a/libavdevice/dshow_pin.c
+++ b/libavdevice/dshow_pin.c
@@ -317,8 +317,8 @@ long ff_dshow_meminputpin_Receive(DShowMemInputPin *this, IMediaSample *sample)
orig_curtime += pin->filter->start_time;
IReferenceClock_GetTime(clock, &graphtime);
if (devtype == VideoDevice && !ctx->use_video_device_timestamps) {
- /* PTS from video devices is unreliable. */
- IReferenceClock_GetTime(clock, &curtime);
+ /* PTS from video devices is unreliable. */
+ curtime = graphtime;
} else {
IMediaSample_GetTime(sample, &curtime, &dummy);
if(curtime > 400000000000000000LL) {
--
2.28.0.windows.1
More information about the ffmpeg-devel
mailing list