summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-07-08 16:43:05 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-07-25 13:19:25 +0300
commit2d1630e10221fa1872c0e501614ef8a77c6319a8 (patch)
tree4b3e8b0a4773d8481102ec8a33381cdf2d50b6ed
parent2117812c7d772879d975b887463e2220daf14cd5 (diff)
downloadgstreamer-plugins-base-2d1630e10221fa1872c0e501614ef8a77c6319a8.tar.gz
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
-rw-r--r--gst-libs/gst/pbutils/encoding-profile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gst-libs/gst/pbutils/encoding-profile.c b/gst-libs/gst/pbutils/encoding-profile.c
index 5cd25416d..0058c8638 100644
--- a/gst-libs/gst/pbutils/encoding-profile.c
+++ b/gst-libs/gst/pbutils/encoding-profile.c
@@ -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);