rtpbasedepayload: improve logging around negative gaps

When warning, it is important that the log will contain information to
help debug the problem. Sequence-numbers are crucial here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/725>
This commit is contained in:
Havard Graff 2020-05-14 15:49:54 +02:00 committed by GStreamer Merge Bot
parent 8aa29ada7f
commit 5464d420f9

View file

@ -455,14 +455,14 @@ gst_rtp_base_depayload_handle_buffer (GstRTPBaseDepayload * filter,
* is not too old, we throw it away as a duplicate. Otherwise we * is not too old, we throw it away as a duplicate. Otherwise we
* mark discont and continue assuming the sender has restarted. See * mark discont and continue assuming the sender has restarted. See
* also RFC 4737. */ * also RFC 4737. */
GST_WARNING ("gap %d <= priv->max_reorder %d -> dropping %d", if (gap <= priv->max_reorder) {
gap, priv->max_reorder, gap <= priv->max_reorder); GST_WARNING_OBJECT (filter, "got old packet %u, expected %u, "
if (gap <= priv->max_reorder) "gap %d <= max_reorder (%d), dropping!",
seqnum, priv->next_seqnum, gap, priv->max_reorder);
goto dropping; goto dropping;
}
GST_LOG_OBJECT (filter, GST_WARNING_OBJECT (filter, "got old packet %u, expected %u, "
"%d > %d, packet too old, sender likely restarted", gap, "marking discont", seqnum, priv->next_seqnum);
priv->max_reorder);
discont = TRUE; discont = TRUE;
} }
} }
@ -550,8 +550,6 @@ invalid_buffer:
dropping: dropping:
{ {
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
GST_WARNING_OBJECT (filter, "%d <= %d, dropping old packet", gap,
priv->max_reorder);
gst_buffer_unref (in); gst_buffer_unref (in);
return GST_FLOW_OK; return GST_FLOW_OK;
} }