diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2019-01-26 21:01:08 -0500 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-06 23:43:08 +0200 |
commit | 84d2d86e29536bf61292b5b3bab70454f6dd3cdd (patch) | |
tree | c7ac674a17a3818d16b560772e05eebb77e43ed3 | |
parent | 54c28f3cca44f0afe3fc08a37d509a40b6da724e (diff) | |
download | gstreamer-plugins-good-84d2d86e29536bf61292b5b3bab70454f6dd3cdd.tar.gz |
rtph264depay: Fix handling or marker on STAP-A
Only forward the marker for the last NAL of the STAP-A. Otherwise each NAL
endup being assumed to be a full frame which may break rendering.
Fixes 557
-rw-r--r-- | gst/rtp/gstrtph264depay.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/rtp/gstrtph264depay.c b/gst/rtp/gstrtph264depay.c index ff34c3c81..7da266fb6 100644 --- a/gst/rtp/gstrtph264depay.c +++ b/gst/rtp/gstrtph264depay.c @@ -1075,6 +1075,8 @@ gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) /* STAP-A Single-time aggregation packet 5.7.1 */ while (payload_len > 2) { + gboolean last = FALSE; + /* 1 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -1108,8 +1110,11 @@ gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) gst_rtp_copy_video_meta (rtph264depay, outbuf, rtp->buffer); + if (payload_len - nalu_size <= 2) + last = TRUE; + gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, timestamp, - marker); + marker && last); payload += nalu_size; payload_len -= nalu_size; |