summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/androidmedia/gstamcvideodec.c3
-rw-r--r--sys/androidmedia/gstamcvideoenc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c
index 53d3879e2..bc82775d8 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 d457ce774..61c06bca1 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;
}
}