I am using ffmpeg 3.1.4 If i stream via command line on Mac 10.10.5 its done properly.
However when i compile source code and add library files in my cocoa app and try to stream i get errors.
Format context is created properly using :
avformat_alloc_output_context2(_avOutputFormatContext, _avOutputFormat, "flv", "rtmp://path/swati.flv"
File is opened properly :
avio_open(&_avOutputFormatContext->pb, cStreamName, AVIO_FLAG_WRITE);
However Error is received at :
avformat_write_header(_avOutputFormatContext, NULL);
It gives -22 error
Any suggestion what should i do.