Unexpected imdecode error

asked Apr 8 '16

AVB gravatar image

updated Apr 8 '16

I wanted to download an image from a given URL. I followed the answer given to a previous question I posted. Here

It works fine on its own, but when I integrated it with Kurento Media Server it did not work.
There was an unexpected error as follows:

Unexpected error while processing method: /build/buildd/opencv-2.4.8+dfsg1/modules/highgui/src/loadsave.cpp:307: error: (-215) buf.data && buf.isContinuous() in function imdecode_
(Code:-32603, Type:null)

What could be the error?

Preview: (hide)

Comments

1

the input to imdecode was empty() / invalid. please check.

berak gravatar imageberak (Apr 8 '16)edit

Oh. Will check that!

AVB gravatar imageAVB (Apr 8 '16)edit

i guess, this is still the curl code, it might not have run at all, leaving you with an empty vector<uchar>

berak gravatar imageberak (Apr 8 '16)edit

Your code has worked in all other cases. Just this server is messing things up, I guess. How can I check whether curl code has been executed??

AVB gravatar imageAVB (Apr 8 '16)edit
1
  • add a print statement in the stream callback function, maybe.
  • check, if the vector is empty() , before calling imdecode()
berak gravatar imageberak (Apr 9 '16)edit

Yes, the vector is indeed empty. curl just won't work for some reason...

AVB gravatar imageAVB (Apr 11 '16)edit