summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Knopp <matej.knopp@gmail.com>2014-10-29 22:55:47 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-11-06 11:54:14 +0100
commitccc6bbf8fe12d6cd0882eb70e9875b6b5bbbb40b (patch)
tree568e28904c114aa223df76702099cc18dea53732
parent5db9ebd7947ffb850c552dff315dc03d5416bf64 (diff)
downloadgstreamer-plugins-bad-ccc6bbf8fe12d6cd0882eb70e9875b6b5bbbb40b.tar.gz
h264parse: don't unnecesarily set src_caps
https://bugzilla.gnome.org/show_bug.cgi?id=739374
-rw-r--r--gst/videoparsers/gsth264parse.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index eae166913..506cd616f 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -1337,6 +1337,19 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
par_n, par_d, NULL);
}
+ /* set profile and level in caps */
+ if (sps) {
+ GstMapInfo map;
+ GstBuffer *sps_buf = h264parse->sps_nals[sps->id];
+
+ if (sps_buf) {
+ gst_buffer_map (sps_buf, &map, GST_MAP_READ);
+ gst_codec_utils_h264_caps_set_level_and_profile (caps,
+ map.data + 1, map.size - 1);
+ gst_buffer_unmap (sps_buf, &map);
+ }
+ }
+
src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (h264parse));
if (src_caps
@@ -1364,19 +1377,6 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
gst_buffer_replace (&h264parse->codec_data, NULL);
}
- /* set profile and level in caps */
- if (sps) {
- GstMapInfo map;
- GstBuffer *sps_buf = h264parse->sps_nals[sps->id];
-
- if (sps_buf) {
- gst_buffer_map (sps_buf, &map, GST_MAP_READ);
- gst_codec_utils_h264_caps_set_level_and_profile (caps,
- map.data + 1, map.size - 1);
- gst_buffer_unmap (sps_buf, &map);
- }
- }
-
gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (h264parse), caps);
}