diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 6da80f2..2182b89 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -882,7 +882,16 @@ gst_h264_parse_handle_frame (GstBaseParse * parse,
       }
     }
 
-    gst_h264_parse_process_nal (h264parse, &nalu);
+    if ((!h264parse->have_sps && nalu.type == GST_H264_NAL_SPS) ||
+        (!h264parse->have_pps && nalu.type == GST_H264_NAL_PPS) ||
+        (h264parse->have_sps && h264parse->have_pps)) {
+      gst_h264_parse_process_nal (h264parse, &nalu);
+    }
+    else {
+      GST_WARNING_OBJECT (h264parse, "no SPS/PPS yet, nal Type: %d, Size: %u will be dropped", nalu.type, nalu.size);
+      *skipsize = nalu.size;
+      goto skip;
+    }
 
     if (nonext)
       break;
