/**< return 0 on packet, no more left, 1 on packet, 1 on partial packet... */
static int
-rdt_parse_packet (PayloadContext *rdt, AVStream *st,
+rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
if (!buf && s->prev_stream_id != -1) {
/* return the next packets, if any */
timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
- rv= s->parse_packet(s->dynamic_protocol_context,
+ rv= s->parse_packet(s->ic, s->dynamic_protocol_context,
s->streams[s->prev_stream_id],
pkt, ×tamp, NULL, 0, flags);
return rv;
return -1;
}
- rv = s->parse_packet(s->dynamic_protocol_context,
+ rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
s->streams[s->prev_stream_id],
pkt, ×tamp, buf, len, flags);
/**
* Packet parsing for "private" payloads in the RTP specs.
*
+ * @param ctx RTSP demuxer context
* @param s stream context
* @param st stream that this packet belongs to
* @param pkt packet in which to write the parsed data
* @param len length of buf
* @param flags flags from the RTP packet header (PKT_FLAG_*)
*/
-typedef int (*DynamicPayloadPacketHandlerProc) (PayloadContext *s,
+typedef int (*DynamicPayloadPacketHandlerProc) (AVFormatContext *ctx,
+ PayloadContext *s,
AVStream *st,
AVPacket * pkt,
uint32_t *timestamp,
}
// return 0 on packet, no more left, 1 on packet, 1 on partial packet...
-static int h264_handle_packet(PayloadContext *data,
+static int h264_handle_packet(AVFormatContext *ctx,
+ PayloadContext *data,
AVStream *st,
AVPacket * pkt,
uint32_t * timestamp,
/* return the next packets, if any */
if(s->st && s->parse_packet) {
timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
- rv= s->parse_packet(s->dynamic_protocol_context,
+ rv= s->parse_packet(s->ic, s->dynamic_protocol_context,
s->st, pkt, ×tamp, NULL, 0, flags);
finalize_packet(s, pkt, timestamp);
return rv;
return 1;
}
} else if (s->parse_packet) {
- rv = s->parse_packet(s->dynamic_protocol_context,
+ rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
s->st, pkt, ×tamp, buf, len, flags);
} else {
// at this point, the RTP header has been stripped; This is ASSUMING that there is only 1 CSRC, which in't wise.