diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.c index 8ee094d5bf..1ee3128968 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.c @@ -182,6 +182,8 @@ gst_rtp_mp4g_depay_class_init (GstRtpMP4GDepayClass * klass) static void gst_rtp_mp4g_depay_init (GstRtpMP4GDepay * rtpmp4gdepay) { + gst_rtp_base_depayload_set_aggregate_hdrext_enabled (GST_RTP_BASE_DEPAYLOAD + (rtpmp4gdepay), TRUE); rtpmp4gdepay->adapter = gst_adapter_new (); rtpmp4gdepay->packets = g_queue_new (); } @@ -348,7 +350,11 @@ gst_rtp_mp4g_depay_push_outbuf (GstRtpMP4GDepay * rtpmp4gdepay, discont ? "" : "expected ", AU_index); gst_rtp_drop_meta (GST_ELEMENT_CAST (rtpmp4gdepay), outbuf, 0); - gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay), outbuf); + if (!rtpmp4gdepay->outbufs) { + rtpmp4gdepay->outbufs = + gst_buffer_list_new_sized (g_queue_get_length (rtpmp4gdepay->packets)); + } + gst_buffer_list_add (rtpmp4gdepay->outbufs, outbuf); rtpmp4gdepay->next_AU_index = AU_index + 1; } @@ -727,6 +733,11 @@ gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp) payload_AU += AU_size; payload_AU_size -= AU_size; } + + if (rtpmp4gdepay->outbufs) { + gst_rtp_base_depayload_push_list (depayload, + g_steal_pointer (&rtpmp4gdepay->outbufs)); + } } else { /* push complete buffer in adapter */ outbuf = gst_rtp_buffer_get_payload_subbuffer (rtp, 0, payload_len); @@ -755,6 +766,7 @@ short_payload: { GST_ELEMENT_WARNING (rtpmp4gdepay, STREAM, DECODE, ("Packet payload was too short."), (NULL)); + gst_rtp_base_depayload_dropped (depayload); return NULL; } } diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.h b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.h index a6a88a0d4b..7887464c2b 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.h +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gdepay.h @@ -73,6 +73,7 @@ struct _GstRtpMP4GDepay GQueue *packets; GstAdapter *adapter; + GstBufferList *outbufs; }; struct _GstRtpMP4GDepayClass