Unexpected imdecode error

asked 2016-04-08 05:52:54 -0500

AVB gravatar image

updated 2016-04-08 05:53:43 -0500

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?

edit retag flag offensive close merge delete

Comments

1

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

berak gravatar imageberak ( 2016-04-08 06:12:15 -0500 )edit

Oh. Will check that!

AVB gravatar imageAVB ( 2016-04-08 06:27:30 -0500 )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 ( 2016-04-08 06:46:33 -0500 )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 ( 2016-04-08 07:00:30 -0500 )edit
1
  • add a print statement in the stream callback function, maybe.
  • check, if the vector is empty() , before calling imdecode()
berak gravatar imageberak ( 2016-04-09 08:58:40 -0500 )edit

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

AVB gravatar imageAVB ( 2016-04-11 00:23:52 -0500 )edit