summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-13 12:06:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-13 12:06:19 +0100
commitde7c95d551881a01cd24885f23bd180fcecc5c07 (patch)
tree055b89369fb437790d85ee55ad8773e5b4ae7283 /libavformat/rtpdec.c
parent9c0ec23c7dde8a2d6a356fa21cf3339b208467cf (diff)
parent7941159df6aad2d219e2a7184489be7a735dd944 (diff)
Merge commit '7941159df6aad2d219e2a7184489be7a735dd944'
* commit '7941159df6aad2d219e2a7184489be7a735dd944': rtpdec/enc: Remove outdated/useless/misleading comments rtpdec: Improve some comments rtpdec: Remove unused context variables rtpdec: Limit writing to the buffer size svq1: Fix building with -DDEBUG svq1: return meaningful error codes. Conflicts: libavcodec/svq1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index f95b364287..b0f0aaa4b0 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -531,7 +531,7 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
if (ret < 0)
return AVERROR(EAGAIN);
if (ret < len) {
- s->read_buf_size = len - ret;
+ s->read_buf_size = FFMIN(len - ret, sizeof(s->buf));
memcpy(s->buf, buf + ret, s->read_buf_size);
s->read_buf_index = 0;
return 1;