mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
mssmanifest: do not set codec_data when it is empty
Some manifests contain empty codec datas, better not set them
This commit is contained in:
parent
9b3f67c5b0
commit
b2ba96bb85
1 changed files with 2 additions and 2 deletions
|
@ -384,7 +384,7 @@ _gst_mss_stream_video_caps_from_qualitylevel_xml (xmlNodePtr node)
|
||||||
gst_structure_set (structure, "height", G_TYPE_INT, atoi (max_height),
|
gst_structure_set (structure, "height", G_TYPE_INT, atoi (max_height),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (codec_data) {
|
if (codec_data && strlen (codec_data)) {
|
||||||
if (strcmp (fourcc, "H264") == 0) {
|
if (strcmp (fourcc, "H264") == 0) {
|
||||||
_gst_mss_stream_add_h264_codec_data (caps, codec_data);
|
_gst_mss_stream_add_h264_codec_data (caps, codec_data);
|
||||||
} else {
|
} else {
|
||||||
|
@ -427,7 +427,7 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (xmlNodePtr node)
|
||||||
if (rate)
|
if (rate)
|
||||||
gst_structure_set (structure, "rate", G_TYPE_INT, atoi (rate), NULL);
|
gst_structure_set (structure, "rate", G_TYPE_INT, atoi (rate), NULL);
|
||||||
|
|
||||||
if (codec_data) {
|
if (codec_data && strlen (codec_data)) {
|
||||||
GValue *value = g_new0 (GValue, 1);
|
GValue *value = g_new0 (GValue, 1);
|
||||||
g_value_init (value, GST_TYPE_BUFFER);
|
g_value_init (value, GST_TYPE_BUFFER);
|
||||||
gst_value_deserialize (value, (gchar *) codec_data);
|
gst_value_deserialize (value, (gchar *) codec_data);
|
||||||
|
|
Loading…
Reference in a new issue