diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-01 00:48:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-01 00:48:28 +0100 |
commit | 6f0a82966d82a88bedab91c617df502c3855e9aa (patch) | |
tree | 4b139f8e46053860027620beaa087ae0a6c09f56 | |
parent | f6f1e1a7a14d0cde4055fa98be2783c5a1131d5b (diff) | |
parent | 12b3459979f5ea6481660cd2c99a0381e2b5ba37 (diff) | |
download | ffmpeg-6f0a82966d82a88bedab91c617df502c3855e9aa.tar.gz |
Merge commit '12b3459979f5ea6481660cd2c99a0381e2b5ba37'
* commit '12b3459979f5ea6481660cd2c99a0381e2b5ba37':
rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rtpenc_amr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpenc_amr.c b/libavformat/rtpenc_amr.c index bd1c197101..2fbbb6d830 100644 --- a/libavformat/rtpenc_amr.c +++ b/libavformat/rtpenc_amr.c @@ -36,7 +36,7 @@ void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size) /* Test if the packet must be sent. */ len = s->buf_ptr - s->buf; - if (s->num_frames == s->max_frames_per_packet || (len && len + size - 1 > s->max_payload_size)) { + if (s->num_frames == s->max_frames_per_packet || (s->num_frames && len + size - 1 > s->max_payload_size)) { int header_size = s->num_frames + 1; p = s->buf + max_header_toc_size - header_size; if (p != s->buf) |