mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
GESTimeline: Prevent saving timelines without any layers
This commit is contained in:
parent
7176c26810
commit
1da6d7a5dd
1 changed files with 8 additions and 0 deletions
|
@ -274,11 +274,16 @@ ges_formatter_save (GESFormatter * formatter, GESTimeline * timeline)
|
||||||
{
|
{
|
||||||
GESFormatterClass *klass;
|
GESFormatterClass *klass;
|
||||||
|
|
||||||
|
/* Saving an empty timeline is not allowed */
|
||||||
|
g_return_val_if_fail (timeline->layers != NULL, FALSE);
|
||||||
|
|
||||||
klass = GES_FORMATTER_GET_CLASS (formatter);
|
klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||||
|
|
||||||
if (klass->save)
|
if (klass->save)
|
||||||
return klass->save (formatter, timeline);
|
return klass->save (formatter, timeline);
|
||||||
|
|
||||||
GST_ERROR ("not implemented!");
|
GST_ERROR ("not implemented!");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,6 +375,9 @@ ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
||||||
{
|
{
|
||||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||||
|
|
||||||
|
/* Saving an empty timeline is not allowed */
|
||||||
|
g_return_val_if_fail (timeline->layers != NULL, FALSE);
|
||||||
|
|
||||||
if (klass->save_to_uri)
|
if (klass->save_to_uri)
|
||||||
return klass->save_to_uri (formatter, timeline, uri);
|
return klass->save_to_uri (formatter, timeline, uri);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue