diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index 53d3879e2c..bc82775d8e 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -682,7 +682,8 @@ _find_nearest_frame (GstAmcVideoDec * self, GstClockTime reference_timestamp) best_id = id; /* For frames without timestamp we simply take the first frame */ - if ((reference_timestamp == 0 && timestamp == 0) || diff == 0) + if ((reference_timestamp == 0 && !GST_CLOCK_TIME_IS_VALID (timestamp)) + || diff == 0) break; } } diff --git a/sys/androidmedia/gstamcvideoenc.c b/sys/androidmedia/gstamcvideoenc.c index d457ce7747..61c06bca15 100644 --- a/sys/androidmedia/gstamcvideoenc.c +++ b/sys/androidmedia/gstamcvideoenc.c @@ -730,7 +730,8 @@ _find_nearest_frame (GstAmcVideoEnc * self, GstClockTime reference_timestamp) best_id = id; /* For frames without timestamp we simply take the first frame */ - if ((reference_timestamp == 0 && timestamp == 0) || diff == 0) + if ((reference_timestamp == 0 && !GST_CLOCK_TIME_IS_VALID (timestamp)) + || diff == 0) break; } }