summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Jackson <nicholas.jackson@zii.aero>2021-01-19 13:19:31 -0800
committerNicholas Jackson <nickajacks1@gmail.com>2021-03-16 15:44:23 +0000
commitad7f7c87f0e86d3e0e2eeb45e9170111b40d4825 (patch)
treed092657dbec4dd5d9f6b08a99b6845659fe1bc80
parent1b81e05ab9203fead9fbca4997703b2ed6484ec2 (diff)
downloadgst-libav-ad7f7c87f0e86d3e0e2eeb45e9170111b40d4825.tar.gz
avmux: fix segfault when a plugin's long_name is NULL
Some plugins register an empty long_name field. Check for this before calling strcmp to avoid a crash. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/114>
-rw-r--r--ext/libav/gstavmux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/libav/gstavmux.c b/ext/libav/gstavmux.c
index 325a79d..32c1832 100644
--- a/ext/libav/gstavmux.c
+++ b/ext/libav/gstavmux.c
@@ -921,9 +921,11 @@ gst_ffmpegmux_register (GstPlugin * plugin)
continue;
}
- if ((!strncmp (in_plugin->long_name, "raw ", 4))) {
- GST_LOG ("Ignoring raw muxer %s", in_plugin->name);
- continue;
+ if (in_plugin->long_name != NULL) {
+ if ((!strncmp (in_plugin->long_name, "raw ", 4))) {
+ GST_LOG ("Ignoring raw muxer %s", in_plugin->name);
+ continue;
+ }
}
if (gst_ffmpegmux_get_replacement (in_plugin->name))