mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
rtpvp9depay: detect incomplete frames and bail out
If a packet with the B bit set arrives but we haven't received a packet with the marker or E bits set to end the previous frame, we know the current frame was incomplete. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/769>
This commit is contained in:
parent
346b077ae0
commit
b22514d469
1 changed files with 9 additions and 0 deletions
|
@ -313,6 +313,15 @@ gst_rtp_vp9_depay_process (GstRTPBaseDepayload * depay, GstRTPBuffer * rtp)
|
||||||
if (G_UNLIKELY (hdrsize >= size))
|
if (G_UNLIKELY (hdrsize >= size))
|
||||||
goto too_small;
|
goto too_small;
|
||||||
|
|
||||||
|
/* If this is a start frame AND we are already processing a frame, we need to flush and wait for next start frame */
|
||||||
|
if (b_bit) {
|
||||||
|
if (G_UNLIKELY (self->started)) {
|
||||||
|
GST_DEBUG_OBJECT (depay, "Incomplete frame, flushing adapter");
|
||||||
|
gst_adapter_clear (self->adapter);
|
||||||
|
self->started = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (!self->started)) {
|
if (G_UNLIKELY (!self->started)) {
|
||||||
/* Check if this is the start of a VP9 layer frame, otherwise bail */
|
/* Check if this is the start of a VP9 layer frame, otherwise bail */
|
||||||
if (!b_bit) {
|
if (!b_bit) {
|
||||||
|
|
Loading…
Reference in a new issue