Commit 49ca5a89 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

encoding-profile: Remove codec_data and streamheader fields from constraint caps

When converting discoverer output to an encoding profile, it makes sense to
omit these. It's very very unlikely that our encoder is going to produce bit
by bit the same codec_data or streamheader.
parent 8a08ebc9
......@@ -1531,8 +1531,19 @@ gst_encoding_profile_from_discoverer (GstDiscovererInfo * info)
for (stream = streams; stream; stream = stream->next) {
GstEncodingProfile *sprofile = NULL;
GstStructure *s;
sinfo = (GstDiscovererStreamInfo *) stream->data;
caps = gst_discoverer_stream_info_get_caps (sinfo);
s = gst_caps_get_structure (caps, 0);
if (gst_structure_has_field (s, "codec_data")
|| gst_structure_has_field (s, "streamheader")) {
caps = gst_caps_make_writable (caps);
s = gst_caps_get_structure (caps, 0);
gst_structure_remove_field (s, "codec_data");
gst_structure_remove_field (s, "streamheader");
GST_LOG ("Stream: %" GST_PTR_FORMAT "\n", caps);
sprofile =
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment