Out of order call to libraw function

While attempting to get more than one image from a file which contains several, using

OUT.shot_select, I'm getting the error

'Out of order call to libraw function'.

I assume that I have to release some resource or reset the image processor in
some way, but I can't see how to from the documentation. Perhaps you could
englighten me...

Thanks in advance

Mike

Forums: 

More detail.

I should mention that the loop for getting multiple images
looks something like:

for(x=0; x < P1.raw_count; x++) {
OUT.shot_select = x;
RawProcessor.unpack();
RawProcessor.dcraw_process();
}

You should call open() on

You should call open() on each iteration:

for(x=0; ; x++) {
RawProcessor.open(filename);
if(x>P1.raw_count) break;
RawProcessor.unpack();
process();

}

-- Alex Tutubalin @LibRaw LLC

Thanks!

Thank you, much appreciated.