mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-05 23:59:55 +00:00
encoding-target: Allow having encoding target without a category set
There was already some code to handle that, but the support was not complete in those code paths.
This commit is contained in:
parent
0256381f6f
commit
96f69fa998
1 changed files with 6 additions and 1 deletions
|
@ -268,7 +268,7 @@ gst_encoding_target_new (const gchar * name, const gchar * category,
|
|||
/* Validate name */
|
||||
if (!validate_name (name))
|
||||
goto invalid_name;
|
||||
if (!validate_name (category))
|
||||
if (category && !validate_name (category))
|
||||
goto invalid_category;
|
||||
|
||||
res = (GstEncodingTarget *) g_object_new (GST_TYPE_ENCODING_TARGET, NULL);
|
||||
|
@ -789,11 +789,16 @@ get_matching_filenames (gchar * path, gchar * filename)
|
|||
GList *res = NULL;
|
||||
GDir *topdir;
|
||||
const gchar *subdirname;
|
||||
gchar *tmp;
|
||||
|
||||
topdir = g_dir_open (path, 0, NULL);
|
||||
if (G_UNLIKELY (topdir == NULL))
|
||||
return NULL;
|
||||
|
||||
tmp = g_build_filename (path, filename, NULL);
|
||||
if (g_file_test (tmp, G_FILE_TEST_EXISTS))
|
||||
res = g_list_append (res, tmp);
|
||||
|
||||
while ((subdirname = g_dir_read_name (topdir))) {
|
||||
gchar *ltmp = g_build_filename (path, subdirname, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue