summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-08-07 11:14:38 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-08-07 12:22:13 +0100
commit61885ba1bcb6f2ff21d3909d83aca46fec3da8d9 (patch)
treed566151561d6e576615942a929aa8f281a5e3b08
parent7ba6694801d6b68d010864cb838794c8213ac3db (diff)
downloadgstreamer-plugins-bad-61885ba1bcb6f2ff21d3909d83aca46fec3da8d9.tar.gz
rtpvp8depay: mark key frames and delta frames properly
https://bugzilla.gnome.org/show_bug.cgi?id=705550
-rw-r--r--gst/rtpvp8/gstrtpvp8depay.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gst/rtpvp8/gstrtpvp8depay.c b/gst/rtpvp8/gstrtpvp8depay.c
index 9d7e5e6d8..1110cc507 100644
--- a/gst/rtpvp8/gstrtpvp8depay.c
+++ b/gst/rtpvp8/gstrtpvp8depay.c
@@ -167,12 +167,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;
}