From: Sebastian Dröge Date: Mon, 25 Apr 2016 13:06:39 +0000 (+0300) Subject: encoding-profile: Remove codec_data and streamheader fields from constraint caps X-Git-Tag: 1.19.3~511^2~2874 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc99a617743bd5e9a46f0dc5b4119d213e5426a3;p=platform%2Fupstream%2Fgstreamer.git 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. https://bugzilla.gnome.org/show_bug.cgi?id=765534 --- diff --git a/gst-libs/gst/pbutils/encoding-profile.c b/gst-libs/gst/pbutils/encoding-profile.c index 2f8e6fe..b58dd88 100644 --- a/gst-libs/gst/pbutils/encoding-profile.c +++ b/gst-libs/gst/pbutils/encoding-profile.c @@ -1531,8 +1531,19 @@ gst_encoding_profile_from_discoverer (GstDiscovererInfo * info) (sinfo)); 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); if (GST_IS_DISCOVERER_AUDIO_INFO (sinfo)) { sprofile =