mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
avdemux: Fix segmentation fault if long_name is NULL
Some plugins (like libcdio) registers empty long_name field. Calling strncmp on this field leads to a segmentation fault. Signed-off-by: Kevin Joly <joly.kevin25@gmail.com>
This commit is contained in:
parent
07f33470b3
commit
9e56619b10
1 changed files with 8 additions and 3 deletions
|
@ -1994,9 +1994,14 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
|||
in_plugin->name, in_plugin->long_name);
|
||||
|
||||
/* no emulators */
|
||||
if (!strncmp (in_plugin->long_name, "raw ", 4) ||
|
||||
!strncmp (in_plugin->long_name, "pcm ", 4) ||
|
||||
!strcmp (in_plugin->name, "audio_device") ||
|
||||
if (in_plugin->long_name != NULL) {
|
||||
if (!strncmp (in_plugin->long_name, "raw ", 4) ||
|
||||
!strncmp (in_plugin->long_name, "pcm ", 4)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp (in_plugin->name, "audio_device") ||
|
||||
!strncmp (in_plugin->name, "image", 5) ||
|
||||
!strcmp (in_plugin->name, "mpegvideo") ||
|
||||
!strcmp (in_plugin->name, "mjpeg") ||
|
||||
|
|
Loading…
Reference in a new issue