h264depay: make sure we call handle_nal for each NAL
authorWim Taymans <wtaymans@redhat.com>
Fri, 30 May 2014 14:43:44 +0000 (16:43 +0200)
committerWim Taymans <wtaymans@redhat.com>
Fri, 30 May 2014 14:51:37 +0000 (16:51 +0200)
Call handle_nal for each NAL in the STAP-A RTP packet. This makes
sure we correctly extract the SPS and PPS.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730999

gst/rtp/gstrtph264depay.c

index a7b52bd..586cf73 100644 (file)
@@ -944,7 +944,11 @@ gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
           memcpy (map.data + sizeof (sync_bytes), payload, nalu_size);
           gst_buffer_unmap (outbuf, &map);
 
-          gst_adapter_push (rtph264depay->adapter, outbuf);
+          outbuf =
+              gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, timestamp,
+              marker);
+          if (outbuf)
+            gst_adapter_push (rtph264depay->adapter, outbuf);
 
           payload += nalu_size;
           payload_len -= nalu_size;