From 1660c4d9141f38c26ababca89fb0b893190ecb33 Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Tue, 5 Sep 2017 12:56:44 +0100 Subject: rtph265depay: fix keyunit detection https://bugzilla.gnome.org/show_bug.cgi?id=787254 --- gst/rtp/gstrtph265depay.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gst/rtp/gstrtph265depay.c b/gst/rtp/gstrtph265depay.c index f139dc0aa..437a26b50 100644 --- a/gst/rtp/gstrtph265depay.c +++ b/gst/rtp/gstrtph265depay.c @@ -927,7 +927,15 @@ gst_rtp_h265_complete_au (GstRtpH265Depay * rtph265depay, || ((nt) == GST_H265_NAL_SLICE_IDR_N_LP)\ || ((nt) == GST_H265_NAL_SLICE_CRA_NUT) ) -#define NAL_TYPE_IS_KEY(nt) (NAL_TYPE_IS_PARAMETER_SET(nt) || NAL_TYPE_IS_CODED_SLICE_SEGMENT(nt)) +/* Intra random access point */ +#define NAL_TYPE_IS_IRAP(nt) (((nt) == GST_H265_NAL_SLICE_BLA_W_LP) \ + || ((nt) == GST_H265_NAL_SLICE_BLA_W_RADL) \ + || ((nt) == GST_H265_NAL_SLICE_BLA_N_LP) \ + || ((nt) == GST_H265_NAL_SLICE_IDR_W_RADL) \ + || ((nt) == GST_H265_NAL_SLICE_IDR_N_LP) \ + || ((nt) == GST_H265_NAL_SLICE_CRA_NUT)) + +#define NAL_TYPE_IS_KEY(nt) (NAL_TYPE_IS_PARAMETER_SET(nt) || NAL_TYPE_IS_IRAP(nt)) static GstBuffer * gst_rtp_h265_depay_handle_nal (GstRtpH265Depay * rtph265depay, GstBuffer * nal, -- cgit v1.2.3