aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorThomas Volkert <thomas@homer-conferencing.com>2014-09-21 12:10:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-21 12:49:08 +0200
commit6821a5a4adcb40c458356e8bb90416dd8f5dd6b2 (patch)
tree50d534d3dbac5e40ab41ced7ad337748c0aa51ea /libavformat/rtpenc.c
parente927682e1b258501f3ddecef85801282267277c7 (diff)
downloadffmpeg-6821a5a4adcb40c458356e8bb90416dd8f5dd6b2.tar.gz
rtpenc: HEVC/H.265 support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 9c587d2dc5..dfaccef2e2 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -53,6 +53,7 @@ static int is_supported(enum AVCodecID id)
case AV_CODEC_ID_H263:
case AV_CODEC_ID_H263P:
case AV_CODEC_ID_H264:
+ case AV_CODEC_ID_HEVC:
case AV_CODEC_ID_MPEG1VIDEO:
case AV_CODEC_ID_MPEG2VIDEO:
case AV_CODEC_ID_MPEG4:
@@ -200,6 +201,13 @@ static int rtp_write_header(AVFormatContext *s1)
s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
}
break;
+ case AV_CODEC_ID_HEVC:
+ if (st->codec->extradata_size > 21 &&
+ (st->codec->extradata[0] || st->codec->extradata[1] ||
+ st->codec->extradata[2] > 1)) {
+ s->nal_length_size = (st->codec->extradata[21] & 0x03) + 1;
+ }
+ break;
case AV_CODEC_ID_VORBIS:
case AV_CODEC_ID_THEORA:
if (!s->max_frames_per_packet) s->max_frames_per_packet = 15;
@@ -577,6 +585,9 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
case AV_CODEC_ID_H263P:
ff_rtp_send_h263(s1, pkt->data, size);
break;
+ case AV_CODEC_ID_HEVC:
+ ff_rtp_send_hevc(s1, pkt->data, size);
+ break;
case AV_CODEC_ID_VORBIS:
case AV_CODEC_ID_THEORA:
ff_rtp_send_xiph(s1, pkt->data, size);