summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-23 23:06:01 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 16:25:43 +0200
commitc82bf15dca00f67a701d126e47ea9075fc9459cb (patch)
treee3764fddb5f6234a4465ff3e9cce69678e106192 /libavformat/rtpenc.c
parent3567b91e49c6ae101c9a35c90f46b8ad9890ac15 (diff)
rtpenc: Merge the h264 and hevc packetizers
They share a great deal of common structure; only a few minor bits in the headers differ. This also fixes an off-by-one in sending of the last fragment of large HEVC nals (where it previously sent len+2 bytes, even if it should have been len+RTP_HEVC_HEADERS_SIZE aka len+3). Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index bf82da0969..0c1f57a50d 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -577,7 +577,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
rtp_send_mpegts_raw(s1, pkt->data, size);
break;
case AV_CODEC_ID_H264:
- ff_rtp_send_h264(s1, pkt->data, size);
+ ff_rtp_send_h264_hevc(s1, pkt->data, size);
break;
case AV_CODEC_ID_H261:
ff_rtp_send_h261(s1, pkt->data, size);
@@ -596,7 +596,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
ff_rtp_send_h263(s1, pkt->data, size);
break;
case AV_CODEC_ID_HEVC:
- ff_rtp_send_hevc(s1, pkt->data, size);
+ ff_rtp_send_h264_hevc(s1, pkt->data, size);
break;
case AV_CODEC_ID_VORBIS:
case AV_CODEC_ID_THEORA: