diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-10-01 12:38:41 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-10-01 12:38:41 +0000 |
commit | 3ff2a0622897f38bdec7a9112e6ac6c0ae8b942a (patch) | |
tree | 60b5d8ec97a85bc4081f2b09998a453107f12c73 /libavformat/rdt.c | |
parent | 985b05d3c91c9edbf9501307878daa4eba223e1d (diff) | |
download | ffmpeg-3ff2a0622897f38bdec7a9112e6ac6c0ae8b942a.tar.gz |
Use parse_packet vfunc in RTPDynamicProtocolHandler instead of hardcoding
the use of rdt_parse_packet(). See "RDT/Realmedia patches #2" thread on ML.
Originally committed as revision 15497 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r-- | libavformat/rdt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index 0dd9a6ef87..c65e1d5e34 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -211,10 +211,13 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestamp; int rv= 0; + if (!s->parse_packet) + return -1; + if (!buf) { /* 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= rdt_parse_packet(s, pkt, ×tamp, NULL, 0, flags); + rv= s->parse_packet(s, pkt, ×tamp, NULL, 0, flags); return rv; } @@ -232,7 +235,7 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt, len -= rv; s->seq = seq; - rv = rdt_parse_packet(s, pkt, ×tamp, buf, len, flags); + rv = s->parse_packet(s, pkt, ×tamp, buf, len, flags); return rv; } @@ -313,7 +316,8 @@ static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \ CODEC_ID_NONE, \ rdt_parse_sdp_line, \ rdt_new_extradata, \ - rdt_free_extradata \ + rdt_free_extradata, \ + rdt_parse_packet \ }; RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", CODEC_TYPE_VIDEO); |