Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Thibault Saunier
gst-devtools
Commits
c45e2612
Commit
c45e2612
authored
Aug 13, 2020
by
Thibault Saunier
🌵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validate: flow: Plug some leaks
Part-of: <
gstreamer/gst-devtools!219
>
parent
4177f099
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
validate/gst/validate/flow/formatting.c
validate/gst/validate/flow/formatting.c
+1
-2
validate/gst/validate/flow/gstvalidateflow.c
validate/gst/validate/flow/gstvalidateflow.c
+4
-3
validate/meson.build
validate/meson.build
+1
-0
No files found.
validate/gst/validate/flow/formatting.c
View file @
c45e2612
...
...
@@ -243,7 +243,6 @@ validate_flow_format_buffer (GstBuffer * buffer, gint checksum_type,
gchar
*
flags_str
,
*
meta_str
,
*
buffer_str
;
gchar
*
buffer_parts
[
7
];
int
buffer_parts_index
=
0
;
gchar
*
sum
;
GstMapInfo
map
;
gchar
**
logged_fields
=
logged_fields_struct
?
gst_validate_utils_get_strv
(
logged_fields_struct
,
...
...
@@ -268,7 +267,7 @@ validate_flow_format_buffer (GstBuffer * buffer, gint checksum_type,
buffer_parts
[
buffer_parts_index
++
]
=
g_string_free
(
content
,
FALSE
);
}
else
{
sum
=
gchar
*
sum
=
g_compute_checksum_for_data
(
checksum_type
==
CHECKSUM_TYPE_AS_ID
?
G_CHECKSUM_SHA1
:
checksum_type
,
map
.
data
,
map
.
size
);
...
...
validate/gst/validate/flow/gstvalidateflow.c
View file @
c45e2612
...
...
@@ -461,7 +461,7 @@ run_diff (const gchar * expected_file, const gchar * actual_file)
&
error
);
if
(
!
error
)
{
gboolean
colored
=
gst_validate_has_colored_output
();
GSubprocess
*
process
;
GSubprocess
*
process
2
;
gchar
*
fname
=
NULL
;
gint
f
=
g_file_open_tmp
(
"XXXXXX.diff"
,
&
fname
,
NULL
);
...
...
@@ -470,12 +470,12 @@ run_diff (const gchar * expected_file, const gchar * actual_file)
g_file_set_contents
(
fname
,
stdout_text
,
-
1
,
NULL
);
close
(
f
);
process
=
process
2
=
g_subprocess_new
(
G_SUBPROCESS_FLAGS_STDOUT_PIPE
,
&
error
,
"bat"
,
"-l"
,
"diff"
,
"--paging"
,
"never"
,
"--color"
,
colored
?
"always"
:
"never"
,
fname
,
NULL
);
g_subprocess_communicate_utf8
(
process
,
NULL
,
NULL
,
&
tmpstdout
,
NULL
,
g_subprocess_communicate_utf8
(
process
2
,
NULL
,
NULL
,
&
tmpstdout
,
NULL
,
&
error
);
if
(
!
error
)
{
g_free
(
stdout_text
);
...
...
@@ -485,6 +485,7 @@ run_diff (const gchar * expected_file, const gchar * actual_file)
GST_DEBUG
(
"Could not use bat: %s"
,
error
->
message
);
g_clear_error
(
&
error
);
}
g_clear_object
(
&
process2
);
g_free
(
fname
);
}
...
...
validate/meson.build
View file @
c45e2612
...
...
@@ -15,6 +15,7 @@ cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
if cc.has_header('unistd.h')
cdata.set('HAVE_UNISTD_H', 1)
endif
configure_file(output : 'config.h', configuration : cdata)
validate_plugins_install_dir = '@0@/gstreamer-1.0/validate'.format(get_option('libdir'))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment