shithub: libvpx

Download patch

ref: 401c8965310a917ca77f5450816f23eb21559b68
parent: 5f3e99166c84c76075f0faf64fb12746c856d8cb
author: Jerome Jiang <jianj@google.com>
date: Thu May 10 10:41:10 EDT 2018

Remove extra line in warnings in ivfdec.c

The warnings give an extra line which is confusing sometimes.

E.g.

Warning: Read invalid frame size (308164564) // This is for frame 5

Warning: Failed to decode frame 5: Invalid parameter
Warning: Read invalid frame size (1936229463) // This is for frame 6

Warning: Failed to decode frame 6: Invalid parameter
Warning: Read invalid frame size (2282536257)

Change-Id: I1753fa32079deca5c8b534c6ca9a527cc9e491e9

--- a/ivfdec.c
+++ b/ivfdec.c
@@ -76,12 +76,12 @@
   size_t frame_size = 0;
 
   if (fread(raw_header, IVF_FRAME_HDR_SZ, 1, infile) != 1) {
-    if (!feof(infile)) warn("Failed to read frame size\n");
+    if (!feof(infile)) warn("Failed to read frame size");
   } else {
     frame_size = mem_get_le32(raw_header);
 
     if (frame_size > 256 * 1024 * 1024) {
-      warn("Read invalid frame size (%u)\n", (unsigned int)frame_size);
+      warn("Read invalid frame size (%u)", (unsigned int)frame_size);
       frame_size = 0;
     }
 
@@ -92,7 +92,7 @@
         *buffer = new_buffer;
         *buffer_size = 2 * frame_size;
       } else {
-        warn("Failed to allocate compressed data buffer\n");
+        warn("Failed to allocate compressed data buffer");
         frame_size = 0;
       }
     }
@@ -100,7 +100,7 @@
 
   if (!feof(infile)) {
     if (fread(*buffer, 1, frame_size, infile) != frame_size) {
-      warn("Failed to read full frame\n");
+      warn("Failed to read full frame");
       return 1;
     }