mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
h264parse: don't unnecesarily set src_caps
https://bugzilla.gnome.org/show_bug.cgi?id=739374
This commit is contained in:
parent
775ba4ff0b
commit
1f367764fc
1 changed files with 13 additions and 13 deletions
|
@ -1347,6 +1347,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
|
||||
|
@ -1374,19 +1387,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue