mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
ges: validate: Use correct types when getting structure values
From https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/247 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5055>
This commit is contained in:
parent
e1e9fbd26b
commit
a1d2cea913
1 changed files with 9 additions and 5 deletions
|
@ -367,11 +367,15 @@ GES_START_VALIDATE_ACTION (_edit)
|
||||||
REPORT_UNLESS (element, beach, "Could not find element %s", element_name);
|
REPORT_UNLESS (element, beach, "Could not find element %s", element_name);
|
||||||
|
|
||||||
if (!_get_clocktime (action->structure, "position", &position, &fposition)) {
|
if (!_get_clocktime (action->structure, "position", &position, &fposition)) {
|
||||||
fposition = 0;
|
gint pos;
|
||||||
if (!gst_structure_get_int (action->structure, "source-frame",
|
gint64 pos64;
|
||||||
(gint *) & fposition)
|
|
||||||
&& !gst_structure_get_int64 (action->structure, "source-frame",
|
if (gst_structure_get_int (action->structure, "source-frame", &pos)) {
|
||||||
&fposition)) {
|
fposition = pos;
|
||||||
|
} else if (gst_structure_get_int64 (action->structure, "source-frame",
|
||||||
|
&pos64)) {
|
||||||
|
fposition = pos64;
|
||||||
|
} else {
|
||||||
gchar *structstr = gst_structure_to_string (action->structure);
|
gchar *structstr = gst_structure_to_string (action->structure);
|
||||||
|
|
||||||
GST_VALIDATE_REPORT_ACTION (scenario, action,
|
GST_VALIDATE_REPORT_ACTION (scenario, action,
|
||||||
|
|
Loading…
Reference in a new issue