From 1ed91ad1dba385b4d0d74d9713cb6bce7edc7cf9 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 22 Aug 2011 17:10:24 +0100 Subject: [PATCH] kate: do not consider an empty SPU to be a fatal error Instead, just encode nothing and go on. https://bugzilla.gnome.org/show_bug.cgi?id=657091 --- ext/kate/gstkatespu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/kate/gstkatespu.c b/ext/kate/gstkatespu.c index ad2a0386ff..4392916341 100644 --- a/ext/kate/gstkatespu.c +++ b/ext/kate/gstkatespu.c @@ -494,9 +494,14 @@ gst_kate_spu_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr, if (G_UNLIKELY (ke->spu_right - ke->spu_left < 0 || ke->spu_bottom - ke->spu_top < 0 || ke->spu_pix_data[0] == 0 || ke->spu_pix_data[1] == 0)) { - GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), - ("SPU area is empty, nothing to encode")); - return GST_FLOW_ERROR; + GST_DEBUG_OBJECT (ke, + "left %d, right %d, top %d, bottom %d, pix data %d %d", ke->spu_left, + ke->spu_right, ke->spu_top, ke->spu_bottom, ke->spu_pix_data[0], + ke->spu_pix_data[1]); + GST_WARNING_OBJECT (ke, "SPU area is empty, nothing to encode"); + kate_bitmap_init (kb); + kb->width = kb->height = 0; + return GST_FLOW_OK; } /* create the palette */