Hello,

 

I'm trying to connect to a Foscam MJpeg IP camera (http) using libav on
Windows and am getting an error code of -5 after 

 

AVFormatContext *pFormatCtx=NULL;

                int             i, videoStream;

                AVCodecContext  *pCodecCtx;

                AVCodec         *pCodec;

                AVFrame         *pFrame; 

                AVFrame         *pFrameRGB;

                AVPacket        packet;

                int             frameFinished;

                int             numBytes;

                uint8_t         *buffer;

                struct SwsContext *img_convert_ctx;

                int frameCount=0;

 

                if(!videoStreamAddress) {

                                printf("Please provide a movie file\n");

                                return -1;

                }

                // Register all formats and codecs

                av_register_all();

                avformat_network_init();

 

                //Open video file

                if(avformat_open_input(&pFormatCtx, videoStreamAddress,
NULL, NULL)!=0)

                {

                                printf("Couldn't open file %s\n",
videoStreamAddress);

                                return -1; // Couldn't open file

                }

 

I tried to get the string value of this error but am getting a write
protected memory error using the built-in av_strerror command.

Any ideas would be appreciated. Thanks!

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to