fix matrix and csv source load
see https://github.com/libvips/libvips/issues/1541#issuecomment-649766008
This commit is contained in:
parent
4bf27acccb
commit
3428767a46
@ -320,8 +320,8 @@ vips_foreign_load_csv_read_double( VipsForeignLoadCsv *csv, double *out )
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_csv_header( VipsForeignLoad *load )
|
vips_foreign_load_csv_header( VipsForeignLoad *load )
|
||||||
{
|
{
|
||||||
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
|
|
||||||
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( load );
|
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( load );
|
||||||
|
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
double value;
|
double value;
|
||||||
@ -381,8 +381,8 @@ vips_foreign_load_csv_header( VipsForeignLoad *load )
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_csv_load( VipsForeignLoad *load )
|
vips_foreign_load_csv_load( VipsForeignLoad *load )
|
||||||
{
|
{
|
||||||
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
|
|
||||||
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( load );
|
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( load );
|
||||||
|
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int x, y;
|
int x, y;
|
||||||
@ -533,8 +533,8 @@ vips_foreign_load_csv_file_get_flags_filename( const char *filename )
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_csv_file_build( VipsObject *object )
|
vips_foreign_load_csv_file_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
VipsForeignLoadCsvFile *file = (VipsForeignLoadCsvFile *) object;
|
|
||||||
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) object;
|
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) object;
|
||||||
|
VipsForeignLoadCsvFile *file = (VipsForeignLoadCsvFile *) object;
|
||||||
|
|
||||||
if( file->filename )
|
if( file->filename )
|
||||||
if( !(csv->source =
|
if( !(csv->source =
|
||||||
@ -601,10 +601,10 @@ G_DEFINE_TYPE( VipsForeignLoadCsvSource, vips_foreign_load_csv_source,
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_csv_source_build( VipsObject *object )
|
vips_foreign_load_csv_source_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
VipsForeignLoadCsvSource *source = (VipsForeignLoadCsvSource *) object;
|
|
||||||
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) object;
|
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) object;
|
||||||
|
VipsForeignLoadCsvSource *source = (VipsForeignLoadCsvSource *) object;
|
||||||
|
|
||||||
if( csv->source ) {
|
if( source->source ) {
|
||||||
csv->source = source->source;
|
csv->source = source->source;
|
||||||
g_object_ref( csv->source );
|
g_object_ref( csv->source );
|
||||||
}
|
}
|
||||||
|
@ -1346,8 +1346,8 @@ G_DEFINE_TYPE( VipsForeignLoadGifFile, vips_foreign_load_gif_file,
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_gif_file_build( VipsObject *object )
|
vips_foreign_load_gif_file_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
VipsForeignLoadGifFile *file = (VipsForeignLoadGifFile *) object;
|
|
||||||
VipsForeignLoadGif *gif = (VipsForeignLoadGif *) object;
|
VipsForeignLoadGif *gif = (VipsForeignLoadGif *) object;
|
||||||
|
VipsForeignLoadGifFile *file = (VipsForeignLoadGifFile *) object;
|
||||||
|
|
||||||
if( file->filename )
|
if( file->filename )
|
||||||
if( !(gif->source =
|
if( !(gif->source =
|
||||||
|
@ -958,8 +958,8 @@ G_DEFINE_TYPE( VipsForeignLoadHeifFile, vips_foreign_load_heif_file,
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_heif_file_build( VipsObject *object )
|
vips_foreign_load_heif_file_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
VipsForeignLoadHeifFile *file = (VipsForeignLoadHeifFile *) object;
|
|
||||||
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
|
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
|
||||||
|
VipsForeignLoadHeifFile *file = (VipsForeignLoadHeifFile *) object;
|
||||||
|
|
||||||
if( file->filename )
|
if( file->filename )
|
||||||
if( !(heif->source =
|
if( !(heif->source =
|
||||||
@ -1040,9 +1040,9 @@ G_DEFINE_TYPE( VipsForeignLoadHeifBuffer, vips_foreign_load_heif_buffer,
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_heif_buffer_build( VipsObject *object )
|
vips_foreign_load_heif_buffer_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
|
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
|
||||||
VipsForeignLoadHeifBuffer *buffer =
|
VipsForeignLoadHeifBuffer *buffer =
|
||||||
(VipsForeignLoadHeifBuffer *) object;
|
(VipsForeignLoadHeifBuffer *) object;
|
||||||
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
|
|
||||||
|
|
||||||
if( buffer->buf )
|
if( buffer->buf )
|
||||||
if( !(heif->source = vips_source_new_from_memory(
|
if( !(heif->source = vips_source_new_from_memory(
|
||||||
@ -1110,9 +1110,9 @@ G_DEFINE_TYPE( VipsForeignLoadHeifSource, vips_foreign_load_heif_source,
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_heif_source_build( VipsObject *object )
|
vips_foreign_load_heif_source_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
|
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
|
||||||
VipsForeignLoadHeifSource *source =
|
VipsForeignLoadHeifSource *source =
|
||||||
(VipsForeignLoadHeifSource *) object;
|
(VipsForeignLoadHeifSource *) object;
|
||||||
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
|
|
||||||
|
|
||||||
if( source->source ) {
|
if( source->source ) {
|
||||||
heif->source = source->source;
|
heif->source = source->source;
|
||||||
|
@ -305,8 +305,8 @@ vips_foreign_load_matrix_file_get_flags_filename( const char *filename )
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_matrix_file_build( VipsObject *object )
|
vips_foreign_load_matrix_file_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
VipsForeignLoadMatrixFile *file = (VipsForeignLoadMatrixFile *) object;
|
|
||||||
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
|
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
|
||||||
|
VipsForeignLoadMatrixFile *file = (VipsForeignLoadMatrixFile *) object;
|
||||||
|
|
||||||
if( file->filename )
|
if( file->filename )
|
||||||
if( !(matrix->source =
|
if( !(matrix->source =
|
||||||
@ -398,11 +398,11 @@ G_DEFINE_TYPE( VipsForeignLoadMatrixSource, vips_foreign_load_matrix_source,
|
|||||||
static int
|
static int
|
||||||
vips_foreign_load_matrix_source_build( VipsObject *object )
|
vips_foreign_load_matrix_source_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
|
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
|
||||||
VipsForeignLoadMatrixSource *source =
|
VipsForeignLoadMatrixSource *source =
|
||||||
(VipsForeignLoadMatrixSource *) object;
|
(VipsForeignLoadMatrixSource *) object;
|
||||||
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
|
|
||||||
|
|
||||||
if( matrix->source ) {
|
if( source->source ) {
|
||||||
matrix->source = source->source;
|
matrix->source = source->source;
|
||||||
g_object_ref( matrix->source );
|
g_object_ref( matrix->source );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user