[FFmpeg-cvslog] rtpenc: Write a log message if the max packet size is too small

Martin Storsjö git at videolan.org
Sat Feb 11 01:35:38 CET 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Feb  9 23:28:01 2012 +0200| [ba83ac4c272eb194ba113956dc89d967bdecf8c6] | committer: Martin Storsjö

rtpenc: Write a log message if the max packet size is too small

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba83ac4c272eb194ba113956dc89d967bdecf8c6
---

 libavformat/rtpenc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 1f036a6..a4a6987 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);



More information about the ffmpeg-cvslog mailing list