diff options
author | Thomas White <taw@physics.org> | 2019-03-08 18:43:04 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-14 11:36:56 +0100 |
commit | de09b82310f7b464e4095d1b750d9b968c84b6ed (patch) | |
tree | b41fbb70c87e4563680babf966fa89ff96097d00 /src/process_image.c | |
parent | 9e1b43f729bf8ba8a6945c5fac67a8796226e2a0 (diff) |
Fix variable initialisation and decision about data source
Diffstat (limited to 'src/process_image.c')
-rw-r--r-- | src/process_image.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/process_image.c b/src/process_image.c index afd43d3b..3dd02aaa 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -195,7 +195,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, int serial, struct sb_shm *sb_shared, TimeAccounts *taccs, char *last_task) { - struct imagefile *imfile; + struct imagefile *imfile = NULL; struct image image; int i; int r; @@ -214,15 +214,15 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, image.serial = serial; image.indexed_by = INDEXING_NONE; - if ( pargs->filename_p_e != NULL ) { + if ( pargs->msgpack_obj != NULL ) { + STATUS("Msgpack!\n"); + if ( unpack_msgpack_data(pargs->msgpack_obj, &image) ) return; + } else if ( pargs->filename_p_e != NULL ) { image.filename = pargs->filename_p_e->filename; image.event = pargs->filename_p_e->ev; if ( file_wait_open_read(sb_shared, &image, taccs, last_task, iargs->wait_for_file, cookie, &imfile) ) return; - } else if ( pargs->msgpack_obj != NULL ) { - STATUS("Msgpack!\n"); - if ( unpack_msgpack_data(pargs->msgpack_obj, &image) ) return; } /* Take snapshot of image before applying horrible noise filters */ |