Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-09 14:41:56 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-01-09 14:42:01 +0400
commit8c3ae9ee66a2fb094b188c994a18df9f3e69a283 (patch)
tree862215cb8df2cbbb8bc2f11f73b642e7f3c8b708 /libavformat/rtpdec.c
parent7b822b1de2eaae56b11b7bfe0d6768723ac67200 (diff)
parent42805eda554a7fc44341282771531e7837ac72b7 (diff)
Merge commit '42805eda554a7fc44341282771531e7837ac72b7'
* commit '42805eda554a7fc44341282771531e7837ac72b7': rtpdec: Store the dynamic payload handler in the rtpdec context Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 31c033a882..1ffa4e0975 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -425,7 +425,7 @@ void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
RTPDynamicProtocolHandler *handler)
{
s->dynamic_protocol_context = ctx;
- s->parse_packet = handler->parse_packet;
+ s->handler = handler;
}
/**
@@ -540,9 +540,10 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
return 1;
}
return 0;
- } else if (s->parse_packet) {
- rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
- s->st, pkt, &timestamp, buf, len, seq, flags);
+ } else if (s->handler && s->handler->parse_packet) {
+ rv = s->handler->parse_packet(s->ic, s->dynamic_protocol_context,
+ s->st, pkt, &timestamp, buf, len, seq,
+ flags);
} else {
/* At this point, the RTP header has been stripped;
* This is ASSUMING that there is only 1 CSRC, which isn't wise. */
@@ -683,13 +684,13 @@ static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt,
if (s->prev_ret <= 0)
return rtp_parse_queued_packet(s, pkt);
/* return the next packets, if any */
- if (s->st && s->parse_packet) {
+ if (s->st && s->handler && s->handler->parse_packet) {
/* timestamp should be overwritten by parse_packet, if not,
* the packet is left with pts == AV_NOPTS_VALUE */
timestamp = RTP_NOTS_VALUE;
- rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
- s->st, pkt, &timestamp, NULL, 0, 0,
- flags);
+ rv = s->handler->parse_packet(s->ic, s->dynamic_protocol_context,
+ s->st, pkt, &timestamp, NULL, 0, 0,
+ flags);
finalize_packet(s, pkt, timestamp);
return rv;
} else {