diff options
author | Antonio Ospite <antonio.ospite@collabora.com> | 2019-03-15 17:38:58 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-01 17:53:48 +0100 |
commit | e47bd848e2596689b648da7ea74ba87596e0780d (patch) | |
tree | efa4fbd1fd1e4772fa1abe27f3d406de7d9a4158 | |
parent | 9ff501951e8a776661aeeb8bb6b9758476f6a6de (diff) | |
download | gstreamer-plugins-base-e47bd848e2596689b648da7ea74ba87596e0780d.tar.gz |
rtpbasepayload: print list size in log output instead of -1
It is weird to see "Preparing to push packet with size 4294967295" in
the logs, so print the list length in case of a buffer list.
-rw-r--r-- | gst-libs/gst/rtp/gstrtpbasepayload.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/rtp/gstrtpbasepayload.c b/gst-libs/gst/rtp/gstrtpbasepayload.c index cc66e9c24..3ce0fd43f 100644 --- a/gst-libs/gst/rtp/gstrtpbasepayload.c +++ b/gst-libs/gst/rtp/gstrtpbasepayload.c @@ -1254,9 +1254,11 @@ gst_rtp_base_payload_prepare_push (GstRTPBasePayload * payload, priv->next_seqnum = data.seqnum; payload->timestamp = data.rtptime; - GST_LOG_OBJECT (payload, "Preparing to push packet with size %" + GST_LOG_OBJECT (payload, "Preparing to push %s with size %" G_GSIZE_FORMAT ", seq=%d, rtptime=%u, pts %" GST_TIME_FORMAT, - (is_list) ? -1 : gst_buffer_get_size (GST_BUFFER (obj)), + (is_list) ? "list" : "packet", + (is_list) ? gst_buffer_list_length (GST_BUFFER_LIST_CAST (obj)) : + gst_buffer_get_size (GST_BUFFER (obj)), payload->seqnum, data.rtptime, GST_TIME_ARGS (data.pts)); if (g_atomic_int_compare_and_exchange (&payload-> |