mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
rtpgstpay: Send caps anyway if caps are pending in the adapter but are different from the new ones
Otherwise it can happen that we receive a caps event, then another caps event and only then buffers. We would then send out the first caps event in the stream but mark buffers with the caps version of the second caps event.
This commit is contained in:
parent
44a697deba
commit
b18ad8b54c
1 changed files with 10 additions and 1 deletions
|
@ -421,8 +421,17 @@ gst_rtp_gst_pay_send_caps (GstRtpGSTPay * rtpgstpay, guint8 cv, GstCaps * caps)
|
|||
guint capslen;
|
||||
GstBuffer *outbuf;
|
||||
|
||||
if (rtpgstpay->flags & (1 << 7))
|
||||
if (rtpgstpay->flags == ((1 << 7) | (cv << 4))) {
|
||||
/* If caps for the current CV are pending in the adapter already, do
|
||||
* nothing at all here
|
||||
*/
|
||||
return;
|
||||
} else if (rtpgstpay->flags & (1 << 7)) {
|
||||
/* Create a new standalone caps packet if caps were already pending.
|
||||
* The next caps are going to be merged with the following buffer or
|
||||
* sent standalone if another event is sent first */
|
||||
gst_rtp_gst_pay_create_from_adapter (rtpgstpay, GST_CLOCK_TIME_NONE);
|
||||
}
|
||||
|
||||
capsstr = gst_caps_to_string (caps);
|
||||
capslen = strlen (capsstr);
|
||||
|
|
Loading…
Reference in a new issue