Commit cedd8e12 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Nicolas Dufresne

h265parse: Fix collection of access units to preserve config headers

Apply the commit 7d44a51b
See also
parent fe4d898d
......@@ -375,7 +375,8 @@ gst_h265_parse_negotiate (GstH265Parse * h265parse, gint in_format,
h265parse->format = format;
h265parse->align = align;
h265parse->transform = (in_format != h265parse->format);
h265parse->transform = in_format != h265parse->format ||
align == GST_H265_PARSE_ALIGN_AU;
if (caps)
gst_caps_unref (caps);
......@@ -1076,7 +1077,13 @@ out:
GST_DEBUG_OBJECT (h265parse, "skipping %d", *skipsize);
gst_h265_parse_reset_frame (h265parse);
/* If we are collecting access units, we need to preserve the initial
* config headers (SPS, PPS et al.) and only reset the frame if another
* slice NAL was received. This means that broken pictures are discarded */
if (h265parse->align != GST_H265_PARSE_ALIGN_AU ||
!(h265parse->state & GST_H265_PARSE_STATE_VALID_PICTURE_HEADERS) ||
(h265parse->state & GST_H265_PARSE_STATE_GOT_SLICE))
gst_h265_parse_reset_frame (h265parse);
goto out;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment