aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-02-09 23:28:01 +0200
committerMartin Storsjö <martin@martin.st>2012-02-10 10:48:51 +0200
commitba83ac4c272eb194ba113956dc89d967bdecf8c6 (patch)
treede925c0be1b261c7333823b3b6ab3b5c3895493f /libavformat/rtpenc.c
parent45b7bd7c53b41bc5ff6fc2158831f2b1b1256113 (diff)
downloadffmpeg-ba83ac4c272eb194ba113956dc89d967bdecf8c6.tar.gz
rtpenc: Write a log message if the max packet size is too small
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 1f036a6baf..a4a6987032 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -108,8 +108,10 @@ static int rtp_write_header(AVFormatContext *s1)
NTP_OFFSET_US;
max_packet_size = s1->pb->max_packet_size;
- if (max_packet_size <= 12)
+ if (max_packet_size <= 12) {
+ av_log(s1, AV_LOG_ERROR, "Max packet size %d too low\n", max_packet_size);
return AVERROR(EIO);
+ }
s->buf = av_malloc(max_packet_size);
if (s->buf == NULL) {
return AVERROR(ENOMEM);