rtpenc: Write a log message if the max packet size is too small
authorMartin Storsjö <martin@martin.st>
Thu, 9 Feb 2012 21:28:01 +0000 (23:28 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 10 Feb 2012 08:48:51 +0000 (10:48 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpenc.c

index 1f036a6..a4a6987 100644 (file)
@@ -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);