<div dir="ltr"><span style="font-size:12.8px">Hello,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm currently trying to receive an RTP streaming, and I'm having problems with opening the stream correctly. This is what I have so far:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">AVFormatContext *rtpFormatContext;</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>rtpFormatContext = avformat_alloc_context();</div><div>rtpFormatContext->iformat = av_find_input_format("rtp");</div><div>sprintf_s(rtpFormatContext->filename, sizeof(rtpFormatContext->filename), "rtp://%s:%d", ip, port);</div><div><br></div><div>avformat_open_input(&rtpFormatContext, rtpFormatContext->filename, rtpFormatContext->iformat, NULL);</div><div>avformat_find_stream_info(rtpFormatContext, NULL);</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">avformat_open_input doesn't create any streams in the rtpFormatContext, av_read_frame doesn't read</div><div style="font-size:12.8px">correctly, a very descriptive message of the possible problem is shown: </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">[rtp @ 00487b00] Unable to receive RTP payload type 96 without and SDP file describing it</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">and av_dump_format shows:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Input #0, rtp, from 'rtp://ip:port'</div><div style="font-size:12.8px">  Duration: N/A, bitrate: N/A</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The clear hint here is that I need an SDP file, but I don't know how I pass the SDP to the AVFormatContext, and what is the proper way to handle RTP receiving in libavformat.</div><div style="font-size:12.8px">The connection is done via a SIP call, so I have the correct SDP information, I'm just having difficulty in finding how to accomplish this task, I'm very new to using libav, so I thank any help I might get.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thank you, Nahra</div></div>