mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
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
This commit is contained in:
parent
46cfb5fa4f
commit
1ed91ad1db
1 changed files with 8 additions and 3 deletions
|
@ -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
|
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_bottom - ke->spu_top < 0 || ke->spu_pix_data[0] == 0
|
||||||
|| ke->spu_pix_data[1] == 0)) {
|
|| ke->spu_pix_data[1] == 0)) {
|
||||||
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
|
GST_DEBUG_OBJECT (ke,
|
||||||
("SPU area is empty, nothing to encode"));
|
"left %d, right %d, top %d, bottom %d, pix data %d %d", ke->spu_left,
|
||||||
return GST_FLOW_ERROR;
|
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 */
|
/* create the palette */
|
||||||
|
|
Loading…
Reference in a new issue