diff mbox

[FFmpeg-devel] lavf/utils: change truncating packet log to a warning

Message ID 20180930050847.12090-1-atomnuker@gmail.com
State New
Headers show

Commit Message

Rostislav Pehlivanov Sept. 30, 2018, 5:08 a.m. UTC
Some scene files do this intentionally for the sake of having a nice checksum.
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rostislav Pehlivanov Oct. 3, 2018, 9:03 a.m. UTC | #1
On Sun, 30 Sep 2018 at 06:08, Rostislav Pehlivanov <atomnuker@gmail.com>
wrote:

> Some scene files do this intentionally for the sake of having a nice
> checksum.
> ---
>  libavformat/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index c973a7e0c5..924b99f6d4 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -257,7 +257,7 @@ int ffio_limit(AVIOContext *s, int size)
>          }
>
>          if (s->maxsize>= 0 && remaining+1 < size) {
> -            av_log(NULL, remaining ? AV_LOG_ERROR : AV_LOG_DEBUG,
> "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
> +            av_log(NULL, remaining ? AV_LOG_WARNING : AV_LOG_DEBUG,
> "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
>              size = remaining+1;
>          }
>      }
> --
> 2.19.0
>
>
Ping?
Michael Niedermayer Oct. 3, 2018, 9:55 a.m. UTC | #2
On Sun, Sep 30, 2018 at 06:08:47AM +0100, Rostislav Pehlivanov wrote:
> Some scene files do this intentionally for the sake of having a nice checksum.

I think this is a bit terse and hard to understand what is meant exactly
maybe you can expand this commit message a bit

thx

[...]
Hendrik Leppkes Oct. 3, 2018, 12:15 p.m. UTC | #3
On Wed, Oct 3, 2018 at 11:55 AM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Sun, Sep 30, 2018 at 06:08:47AM +0100, Rostislav Pehlivanov wrote:
> > Some scene files do this intentionally for the sake of having a nice checksum.
>
> I think this is a bit terse and hard to understand what is meant exactly
> maybe you can expand this commit message a bit
>

Also, just because someone creates intentionally malformed files
doesn't make them any less malformed.

- Hendrik
diff mbox

Patch

diff --git a/libavformat/utils.c b/libavformat/utils.c
index c973a7e0c5..924b99f6d4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -257,7 +257,7 @@  int ffio_limit(AVIOContext *s, int size)
         }
 
         if (s->maxsize>= 0 && remaining+1 < size) {
-            av_log(NULL, remaining ? AV_LOG_ERROR : AV_LOG_DEBUG, "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
+            av_log(NULL, remaining ? AV_LOG_WARNING : AV_LOG_DEBUG, "Truncating packet of size %d to %"PRId64"\n", size, remaining+1);
             size = remaining+1;
         }
     }