Commit 2d1630e1 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

encoding-profile: Remove some more fields from the caps when creating from discoverer info

parsed, framed, stream-format and alignment are only relevant for parsers and
should not matter here. We still want to be able to use an encoder that can
only output byte-stream if the input was avc.

https://bugzilla.gnome.org/show_bug.cgi?id=768566
parent 2117812c
......@@ -1499,13 +1499,22 @@ add_stream_to_profile (GstEncodingContainerProfile * profile,
caps = gst_discoverer_stream_info_get_caps (sinfo);
/* Should unify this with copy_and_clean_caps() */
s = gst_caps_get_structure (caps, 0);
if (gst_structure_has_field (s, "codec_data")
|| gst_structure_has_field (s, "streamheader")) {
|| gst_structure_has_field (s, "streamheader")
|| gst_structure_has_field (s, "parsed")
|| gst_structure_has_field (s, "framed")
|| gst_structure_has_field (s, "stream-format")
|| gst_structure_has_field (s, "alignment")) {
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_structure_remove_field (s, "parsed");
gst_structure_remove_field (s, "framed");
gst_structure_remove_field (s, "stream-format");
gst_structure_remove_field (s, "alignment");
}
GST_LOG ("Stream: %" GST_PTR_FORMAT "\n", caps);
......
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