We are trying to extract the "Sequence Number" from the RTP header of a packet. We use av_read_frame in order to read the packets into AVPacket structs.
We tried using the AVPacket.data field, hoping it holds the original payload, but we didn't manage to find the right location of the header. So we assume that the data field does not hold the full payload - please correct if we are wrong.
Is there a way to find the RTP header information?
Use RTPDemuxContext, it contains the RTP header info, after reading a frame
To access it use the AVFormatContext you used when you opened the stream
AVPacket* packet;
av_read_frame(formatCtx, packet);
RTSPState* rtspState = formatCtx->priv_data;
RTPDemuxContext *rtpdemux = rtspState->rtsp_streams[packet->stream_index]->transport_priv;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With