mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
rtpsource: properly compare buffer PTSs
This commit is contained in:
parent
57829c3352
commit
53f03d4cc1
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue