Commit 13117e5d authored by rbultje's avatar rbultje

Use parse_packet vfunc in RTPDynamicProtocolHandler instead of hardcoding

the use of rdt_parse_packet(). See "RDT/Realmedia patches #2" thread on ML.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15497 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 541526fc
...@@ -211,10 +211,13 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt, ...@@ -211,10 +211,13 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
uint32_t timestamp; uint32_t timestamp;
int rv= 0; int rv= 0;
if (!s->parse_packet)
return -1;
if (!buf) { if (!buf) {
/* return the next packets, if any */ /* 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.... 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, &timestamp, NULL, 0, flags); rv= s->parse_packet(s, pkt, &timestamp, NULL, 0, flags);
return rv; return rv;
} }
...@@ -232,7 +235,7 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt, ...@@ -232,7 +235,7 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
len -= rv; len -= rv;
s->seq = seq; s->seq = seq;
rv = rdt_parse_packet(s, pkt, &timestamp, buf, len, flags); rv = s->parse_packet(s, pkt, &timestamp, buf, len, flags);
return rv; return rv;
} }
...@@ -313,7 +316,8 @@ static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \ ...@@ -313,7 +316,8 @@ static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \
CODEC_ID_NONE, \ CODEC_ID_NONE, \
rdt_parse_sdp_line, \ rdt_parse_sdp_line, \
rdt_new_extradata, \ rdt_new_extradata, \
rdt_free_extradata \ rdt_free_extradata, \
rdt_parse_packet \
}; };
RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", CODEC_TYPE_VIDEO); RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", CODEC_TYPE_VIDEO);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment