mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-28 09:15:08 +00:00
rtph264pay: Clean up _payload_nal_single
This commit is contained in:
parent
b3291620ca
commit
166c49b800
|
@ -1012,7 +1012,6 @@ gst_rtp_h264_pay_payload_nal_single (GstRTPBasePayload * basepayload,
|
||||||
gboolean delta_unit, gboolean discont)
|
gboolean delta_unit, gboolean discont)
|
||||||
{
|
{
|
||||||
GstRtpH264Pay *rtph264pay;
|
GstRtpH264Pay *rtph264pay;
|
||||||
GstFlowReturn ret;
|
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
GstRTPBuffer rtp = { NULL };
|
GstRTPBuffer rtp = { NULL };
|
||||||
|
|
||||||
|
@ -1031,17 +1030,11 @@ gst_rtp_h264_pay_payload_nal_single (GstRTPBasePayload * basepayload,
|
||||||
GST_BUFFER_PTS (outbuf) = pts;
|
GST_BUFFER_PTS (outbuf) = pts;
|
||||||
GST_BUFFER_DTS (outbuf) = dts;
|
GST_BUFFER_DTS (outbuf) = dts;
|
||||||
|
|
||||||
if (!delta_unit)
|
if (delta_unit)
|
||||||
/* Only the first packet sent should not have the flag */
|
|
||||||
delta_unit = TRUE;
|
|
||||||
else
|
|
||||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||||
|
|
||||||
if (discont) {
|
if (discont)
|
||||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
||||||
/* Only the first packet sent should have the flag */
|
|
||||||
discont = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
gst_rtp_buffer_unmap (&rtp);
|
||||||
|
|
||||||
|
@ -1050,8 +1043,7 @@ gst_rtp_h264_pay_payload_nal_single (GstRTPBasePayload * basepayload,
|
||||||
outbuf = gst_buffer_append (outbuf, paybuf);
|
outbuf = gst_buffer_append (outbuf, paybuf);
|
||||||
|
|
||||||
/* push the buffer to the next element */
|
/* push the buffer to the next element */
|
||||||
ret = gst_rtp_base_payload_push (basepayload, outbuf);
|
return gst_rtp_base_payload_push (basepayload, outbuf);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
|
Loading…
Reference in a new issue