aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-19 02:33:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-19 02:34:17 +0100
commit5162af67f41214edacefe05d9723e4a6d9847900 (patch)
treee07706bd952bc563e0b56adc26199675e19238d1 /libavformat/rtpenc.c
parent3f5d1c8130b1326d779c4216886272a3efce816a (diff)
parenta505c0d7373336a4cc5aa2022111c46bdd388b1f (diff)
downloadffmpeg-5162af67f41214edacefe05d9723e4a6d9847900.tar.gz
Merge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'
* commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f': rtp: Initial H.261 support Conflicts: Changelog libavformat/rtpdec_h261.c libavformat/rtpenc_h261.c libavformat/sdp.c libavformat/version.h See: 50a4d5cfc6749932347ee38c25b5040aea4b13a0 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index ef8b33c7cd..c4c4d3e416 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -89,7 +89,7 @@ static int is_supported(enum AVCodecID id)
static int rtp_write_header(AVFormatContext *s1)
{
RTPMuxContext *s = s1->priv_data;
- int n;
+ int n, ret = AVERROR(EINVAL);
AVStream *st;
if (s1->nb_streams != 1) {
@@ -195,6 +195,17 @@ static int rtp_write_header(AVFormatContext *s1)
s->max_payload_size = n * TS_PACKET_SIZE;
s->buf_ptr = s->buf;
break;
+ case AV_CODEC_ID_H261:
+ if (s1->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
+ av_log(s, AV_LOG_ERROR,
+ "Packetizing H261 is experimental and produces incorrect "
+ "packetization for cases where GOBs don't fit into packets "
+ "(even though most receivers may handle it just fine). "
+ "Please set -f_strict experimental in order to enable it.\n");
+ ret = AVERROR_EXPERIMENTAL;
+ goto fail;
+ }
+ break;
case AV_CODEC_ID_H264:
/* check for H.264 MP4 syntax */
if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
@@ -277,7 +288,7 @@ defaultcase:
fail:
av_freep(&s->buf);
- return AVERROR(EINVAL);
+ return ret;
}
/* send an rtcp sender report packet */