summaryrefslogtreecommitdiff
path: root/gst/dvdspu
diff options
context:
space:
mode:
Diffstat (limited to 'gst/dvdspu')
-rw-r--r--gst/dvdspu/gstspu-pgs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c
index 009c3e09b..6108de07c 100644
--- a/gst/dvdspu/gstspu-pgs.c
+++ b/gst/dvdspu/gstspu-pgs.c
@@ -318,6 +318,8 @@ pgs_presentation_segment_set_object_count (PgsPresentationSegment * ps,
guint8 n_objects)
{
if (ps->objects == NULL) {
+ if (n_objects == 0)
+ return;
ps->objects =
g_array_sized_new (FALSE, TRUE, sizeof (PgsCompositionObject),
n_objects);