From 957c8e3e61b61b9e08f1fe493a4dfb5cb49d3293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 7 Aug 2013 11:14:38 +0100 Subject: [PATCH] rtpvp8depay: mark key frames and delta frames properly https://bugzilla.gnome.org/show_bug.cgi?id=705550 --- gst/rtp/gstrtpvp8depay.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/rtp/gstrtpvp8depay.c b/gst/rtp/gstrtpvp8depay.c index 2d46f5e0c3..7cc4504a4d 100644 --- a/gst/rtp/gstrtpvp8depay.c +++ b/gst/rtp/gstrtpvp8depay.c @@ -164,12 +164,23 @@ gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depay, GstBuffer * buf) /* Marker indicates that it was the last rtp packet for this frame */ if (gst_rtp_buffer_get_marker (&rtpbuffer)) { GstBuffer *out; + guint8 flag0; + + gst_adapter_copy (self->adapter, &flag0, 0, 1); out = gst_adapter_take_buffer (self->adapter, gst_adapter_available (self->adapter)); self->started = FALSE; gst_rtp_buffer_unmap (&rtpbuffer); + + /* mark keyframes */ + out = gst_buffer_make_writable (out); + if ((flag0 & 0x01)) + GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_DELTA_UNIT); + else + GST_BUFFER_FLAG_UNSET (out, GST_BUFFER_FLAG_DELTA_UNIT); + return out; }