rtph265depay; Fix handling of marker on aggregated packet

When multiple nals are aggrgated, the marker bit should be associated only
with the last NAL of the packet. Otherwise we may break rendering in with
AU alignment.
This commit is contained in:
Nicolas Dufresne 2019-01-26 21:02:27 -05:00 committed by Olivier Crête
parent 98251f0158
commit 6d3859bf70

View file

@ -1363,6 +1363,7 @@ gst_rtp_h265_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
#endif
while (payload_len > 2) {
gboolean last = FALSE;
nalu_size = (payload[0] << 8) | payload[1];
@ -1389,8 +1390,11 @@ gst_rtp_h265_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
gst_rtp_copy_video_meta (rtph265depay, outbuf, rtp->buffer);
if (payload_len - nalu_size <= 2)
last = TRUE;
gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf, timestamp,
marker);
marker && last);
payload += nalu_size;
payload_len -= nalu_size;