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
This commit is contained in:
Sebastian Dröge 2016-07-08 16:43:05 +03:00
parent 0e7cdee6c8
commit 48324cab38

View file

@ -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);