File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1513,7 +1513,15 @@ init_track_data(GstKvsSink *kvssink) {
15131513 if (caps == NULL ) {
15141514 LOG_AND_THROW (" Error, GStreamer pad returned NULL caps. Pad has no peer for stream: " << kvssink->stream_name );
15151515 }
1516-
1516+
1517+ if (gst_caps_is_empty (caps)) {
1518+ LOG_AND_THROW (" Error, GStreamer caps are empty for stream: " << kvssink->stream_name );
1519+ }
1520+
1521+ gchar *caps_str = gst_caps_to_string (caps);
1522+ LOG_INFO (" GStreamer caps: " << caps_str);
1523+ g_free (caps_str);
1524+
15171525 media_type = gst_structure_get_name (gst_caps_get_structure (caps, 0 ));
15181526 if (strncmp (media_type, GSTREAMER_MEDIA_TYPE_H264, MAX_GSTREAMER_MEDIA_TYPE_LEN) == 0 ) {
15191527 // default codec id is for h264 video.
You can’t perform that action at this time.
0 commit comments