world. I'm trying to grab rtsp mjpeg stream from IP-camera (realtime) as described in http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html, but ported to newer version. It works well with mpeg file (loading it full as one AVPacket), but working with stream, avcodec_decode_video2 returns -1 (error). AVPacket in this case is a part of a frame.
How can I fix this?