projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57829c3
)
rtpsource: properly compare buffer PTSs
author
Miguel Paris
<mparisdiaz@gmail.com>
Thu, 29 Nov 2018 12:01:44 +0000
(13:01 +0100)
committer
Sebastian Dröge
<slomo@coaxion.net>
Fri, 30 Nov 2018 10:55:26 +0000
(10:55 +0000)
gst/rtpmanager/rtpsource.c
patch
|
blob
|
history
diff --git
a/gst/rtpmanager/rtpsource.c
b/gst/rtpmanager/rtpsource.c
index
8430a15
..
30c3466
100644
(file)
--- a/
gst/rtpmanager/rtpsource.c
+++ b/
gst/rtpmanager/rtpsource.c
@@
-1850,7
+1850,16
@@
compare_buffers (gconstpointer a, gconstpointer b, gpointer user_data)
const GstBuffer *bufa = a;
const GstBuffer *bufb = b;
- return GST_BUFFER_PTS (bufa) - GST_BUFFER_PTS (bufb);
+ g_return_val_if_fail (GST_BUFFER_PTS (bufa) != GST_CLOCK_TIME_NONE, -1);
+ g_return_val_if_fail (GST_BUFFER_PTS (bufb) != GST_CLOCK_TIME_NONE, 1);
+
+ if (GST_BUFFER_PTS (bufa) < GST_BUFFER_PTS (bufb)) {
+ return -1;
+ } else if (GST_BUFFER_PTS (bufa) > GST_BUFFER_PTS (bufb)) {
+ return 1;
+ }
+
+ return 0;
}
void