diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-18 20:05:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-18 20:07:00 +0200 |
commit | 82edf6727f0663601351081ca1e4fb20d1752972 (patch) | |
tree | 12479c3ec8cedfa0ec4dda38a72023224f2b5b73 /libavformat/rtpenc.c | |
parent | f87dacb27de93f995cb18f9dcc73581ef8fc157b (diff) | |
parent | f61ce90caa909d131ea6ec205823568a38115529 (diff) | |
download | ffmpeg-82edf6727f0663601351081ca1e4fb20d1752972.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs
lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
Add Dolby/DPLII downmix support to libavresample
vorbisdec: replace div/mod in loop with a counter
fate: vorbis: add 5.1 surround test
rtpenc: Allow requesting H264 RTP packetization mode 0
configure: Sort the library listings in the help text alphabetically
dwt: remove variable-length arrays
RTMPT protocol support
http: Properly handle chunked transfer-encoding for replies to post data
http: Fail reading if the connection has gone away
amr: Mark an array const
amr: More space cleanup
rtpenc: Fix memory leaks in the muxer open function
Conflicts:
Changelog
configure
doc/APIchanges
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 57d025a364..e16e610820 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -198,11 +198,11 @@ static int rtp_write_header(AVFormatContext *s1) /* max_header_toc_size + the largest AMR payload must fit */ if (1 + s->max_frames_per_packet + n > s->max_payload_size) { av_log(s1, AV_LOG_ERROR, "RTP max payload size too small for AMR\n"); - return -1; + goto fail; } if (st->codec->channels != 1) { av_log(s1, AV_LOG_ERROR, "Only mono is supported\n"); - return -1; + goto fail; } case CODEC_ID_AAC: s->num_frames = 0; @@ -216,6 +216,10 @@ defaultcase: } return 0; + +fail: + av_freep(&s->buf); + return AVERROR(EINVAL); } /* send an rtcp sender report packet */ |