mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
amc: Fix crash when encoding AVC
gstamcvideoenc.c calls gst_amc_avc_profile_to_string() with alternatives set to NULL which causes a crash. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1732>
This commit is contained in:
parent
bfb9071081
commit
dd7b672830
1 changed files with 2 additions and 1 deletions
|
@ -1197,6 +1197,7 @@ gst_amc_avc_profile_to_string (gint profile, const gchar ** alternative)
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (avc_profile_mapping_table); i++) {
|
for (i = 0; i < G_N_ELEMENTS (avc_profile_mapping_table); i++) {
|
||||||
if (avc_profile_mapping_table[i].id == profile) {
|
if (avc_profile_mapping_table[i].id == profile) {
|
||||||
|
if (alternative != NULL)
|
||||||
*alternative = avc_profile_mapping_table[i].alt_str;
|
*alternative = avc_profile_mapping_table[i].alt_str;
|
||||||
return avc_profile_mapping_table[i].str;
|
return avc_profile_mapping_table[i].str;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue