summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-02-07 16:39:14 +0200
committerMartin Storsjö <martin@martin.st>2012-02-23 15:27:52 +0200
commitc4584f3c1ff3997fd98c3cc992fe82cb99f6b248 (patch)
tree27ab1cbe0c48ac4f703782ede6039ba46b6924a4 /libavformat/rtpenc.c
parentc2ff63e3ac82d5ee501e480d4714e982fc45cf8b (diff)
rtpenc: Allow packetizing H263 according to the old RFC 2190
According to newer RFCs, this packetization scheme should only be used for interfacing with legacy systems. Implementing this packetization mode properly requires parsing the full H263 bitstream to find macroblock boundaries (and knowing their macroblock and gob numbers and motion vector predictors). This implementation tries to look for GOB headers (which can be inserted by using -ps <small number>), but if the GOBs aren't small enough to fit into the MTU, the packetizer blindly splits packets at any offset and claims it to be a GOB boundary (by using Mode A from the RFC). While not correct, this seems to work with some receivers. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index e19541798b..4d4e168c97 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -443,6 +443,11 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
ff_rtp_send_h264(s1, pkt->data, size);
break;
case CODEC_ID_H263:
+ if (s->flags & FF_RTP_FLAG_RFC2190) {
+ ff_rtp_send_h263_rfc2190(s1, pkt->data, size);
+ break;
+ }
+ /* Fallthrough */
case CODEC_ID_H263P:
ff_rtp_send_h263(s1, pkt->data, size);
break;