ffio_read: dont spam the user at EOF with a truncation error
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 8 Sep 2012 10:08:25 +0000 (12:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 8 Sep 2012 10:41:57 +0000 (12:41 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 1988fbd..5057bf1 100644 (file)
@@ -287,7 +287,7 @@ int ffio_limit(AVIOContext *s, int size)
         }
 
         if(s->maxsize>=0 && remaining+1 < size){
-            av_log(0, AV_LOG_ERROR, "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
+            av_log(0, remaining ? AV_LOG_ERROR : AV_LOG_DEBUG, "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
             size= remaining+1;
         }
     }