mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
rtph264depay: tweak DELTA_UNIT labeling
Consider SPS, PPS and IDR as keyframe, all others as DELTA_UNIT. See #620154.
This commit is contained in:
parent
8883421b0d
commit
6a9c70486f
1 changed files with 4 additions and 5 deletions
|
@ -412,14 +412,13 @@ gst_rtp_h264_depay_mark_delta (GstRtpH264Depay * rtph264depay, GstBuffer * nal)
|
||||||
|
|
||||||
nal_unit_type = (GST_BUFFER_DATA (nal))[4] & 0x1f;
|
nal_unit_type = (GST_BUFFER_DATA (nal))[4] & 0x1f;
|
||||||
GST_DEBUG_OBJECT (rtph264depay, "type %d", nal_unit_type);
|
GST_DEBUG_OBJECT (rtph264depay, "type %d", nal_unit_type);
|
||||||
/* non-IDR VCL layer NAL considered DELTA, also AU and SEI;
|
/* SPS/PPS/IDR considered key, all others DELTA;
|
||||||
* so downstream waiting for keyframe can pick up at SPS/PPS/IDR */
|
* so downstream waiting for keyframe can pick up at SPS/PPS/IDR */
|
||||||
if ((nal_unit_type >= 1 && nal_unit_type <= 4) ||
|
if ((nal_unit_type == 5) || (nal_unit_type == 7) || (nal_unit_type == 8)) {
|
||||||
(nal_unit_type == 6) || (nal_unit_type == 9)) {
|
GST_BUFFER_FLAG_UNSET (nal, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||||
|
} else {
|
||||||
GST_BUFFER_FLAG_SET (nal, GST_BUFFER_FLAG_DELTA_UNIT);
|
GST_BUFFER_FLAG_SET (nal, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
} else {
|
|
||||||
GST_BUFFER_FLAG_UNSET (nal, GST_BUFFER_FLAG_DELTA_UNIT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue