[FFmpeg-devel,v2,1/2] lavf/dump: use error log level for invalid size

Submitted by lance.lmwang@gmail.com on Aug. 10, 2019, 3:53 p.m.

Details

Message ID 20190810155348.12649-1-lance.lmwang@gmail.com
State Accepted
Commit df6e341b0418e53b70938923f8ba903f74f4a778
Headers show

Commit Message

lance.lmwang@gmail.com Aug. 10, 2019, 3:53 p.m.
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavformat/dump.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Steven Liu Aug. 11, 2019, 8:41 a.m.
> 在 2019年8月10日,23:53,lance.lmwang@gmail.com 写道:
> 
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
> libavformat/dump.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/dump.c b/libavformat/dump.c
> index 1c44656..68ce9a8 100644
> --- a/libavformat/dump.c
> +++ b/libavformat/dump.c
> @@ -210,7 +210,7 @@ static void dump_paramchange(void *ctx, AVPacketSideData *sd)
> 
>     return;
> fail:
> -    av_log(ctx, AV_LOG_INFO, "unknown param");
> +    av_log(ctx, AV_LOG_ERROR, "unknown param");
> }
> 
> /* replaygain side data*/
> @@ -239,7 +239,7 @@ static void dump_replaygain(void *ctx, AVPacketSideData *sd)
>     AVReplayGain *rg;
> 
>     if (sd->size < sizeof(*rg)) {
> -        av_log(ctx, AV_LOG_INFO, "invalid data");
> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>         return;
>     }
>     rg = (AVReplayGain*)sd->data;
> @@ -255,7 +255,7 @@ static void dump_stereo3d(void *ctx, AVPacketSideData *sd)
>     AVStereo3D *stereo;
> 
>     if (sd->size < sizeof(*stereo)) {
> -        av_log(ctx, AV_LOG_INFO, "invalid data");
> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>         return;
>     }
> 
> @@ -272,7 +272,7 @@ static void dump_audioservicetype(void *ctx, AVPacketSideData *sd)
>     enum AVAudioServiceType *ast = (enum AVAudioServiceType *)sd->data;
> 
>     if (sd->size < sizeof(*ast)) {
> -        av_log(ctx, AV_LOG_INFO, "invalid data");
> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>         return;
>     }
> 
> @@ -315,7 +315,7 @@ static void dump_cpb(void *ctx, AVPacketSideData *sd)
>     AVCPBProperties *cpb = (AVCPBProperties *)sd->data;
> 
>     if (sd->size < sizeof(*cpb)) {
> -        av_log(ctx, AV_LOG_INFO, "invalid data");
> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>         return;
>     }
> 
> @@ -357,7 +357,7 @@ static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *
>     double yaw, pitch, roll;
> 
>     if (sd->size < sizeof(*spherical)) {
> -        av_log(ctx, AV_LOG_INFO, "invalid data");
> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>         return;
>     }
> 
> -- 
> 2.6.4
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

lgtm

Thanks
Steven
Steven Liu Aug. 18, 2019, 12:19 a.m.
> 在 2019年8月11日,下午4:41,Steven Liu <lq@chinaffmpeg.org> 写道:
> 
> 
> 
>> 在 2019年8月10日,23:53,lance.lmwang@gmail.com 写道:
>> 
>> From: Limin Wang <lance.lmwang@gmail.com>
>> 
>> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
>> ---
>> libavformat/dump.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>> 
>> diff --git a/libavformat/dump.c b/libavformat/dump.c
>> index 1c44656..68ce9a8 100644
>> --- a/libavformat/dump.c
>> +++ b/libavformat/dump.c
>> @@ -210,7 +210,7 @@ static void dump_paramchange(void *ctx, AVPacketSideData *sd)
>> 
>>    return;
>> fail:
>> -    av_log(ctx, AV_LOG_INFO, "unknown param");
>> +    av_log(ctx, AV_LOG_ERROR, "unknown param");
>> }
>> 
>> /* replaygain side data*/
>> @@ -239,7 +239,7 @@ static void dump_replaygain(void *ctx, AVPacketSideData *sd)
>>    AVReplayGain *rg;
>> 
>>    if (sd->size < sizeof(*rg)) {
>> -        av_log(ctx, AV_LOG_INFO, "invalid data");
>> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>>        return;
>>    }
>>    rg = (AVReplayGain*)sd->data;
>> @@ -255,7 +255,7 @@ static void dump_stereo3d(void *ctx, AVPacketSideData *sd)
>>    AVStereo3D *stereo;
>> 
>>    if (sd->size < sizeof(*stereo)) {
>> -        av_log(ctx, AV_LOG_INFO, "invalid data");
>> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>>        return;
>>    }
>> 
>> @@ -272,7 +272,7 @@ static void dump_audioservicetype(void *ctx, AVPacketSideData *sd)
>>    enum AVAudioServiceType *ast = (enum AVAudioServiceType *)sd->data;
>> 
>>    if (sd->size < sizeof(*ast)) {
>> -        av_log(ctx, AV_LOG_INFO, "invalid data");
>> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>>        return;
>>    }
>> 
>> @@ -315,7 +315,7 @@ static void dump_cpb(void *ctx, AVPacketSideData *sd)
>>    AVCPBProperties *cpb = (AVCPBProperties *)sd->data;
>> 
>>    if (sd->size < sizeof(*cpb)) {
>> -        av_log(ctx, AV_LOG_INFO, "invalid data");
>> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>>        return;
>>    }
>> 
>> @@ -357,7 +357,7 @@ static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *
>>    double yaw, pitch, roll;
>> 
>>    if (sd->size < sizeof(*spherical)) {
>> -        av_log(ctx, AV_LOG_INFO, "invalid data");
>> +        av_log(ctx, AV_LOG_ERROR, "invalid data");
>>        return;
>>    }
>> 
>> -- 
>> 2.6.4
>> 
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 
> lgtm

Pushed

Thanks
Steven

Patch hide | download patch | download mbox

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 1c44656..68ce9a8 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -210,7 +210,7 @@  static void dump_paramchange(void *ctx, AVPacketSideData *sd)
 
     return;
 fail:
-    av_log(ctx, AV_LOG_INFO, "unknown param");
+    av_log(ctx, AV_LOG_ERROR, "unknown param");
 }
 
 /* replaygain side data*/
@@ -239,7 +239,7 @@  static void dump_replaygain(void *ctx, AVPacketSideData *sd)
     AVReplayGain *rg;
 
     if (sd->size < sizeof(*rg)) {
-        av_log(ctx, AV_LOG_INFO, "invalid data");
+        av_log(ctx, AV_LOG_ERROR, "invalid data");
         return;
     }
     rg = (AVReplayGain*)sd->data;
@@ -255,7 +255,7 @@  static void dump_stereo3d(void *ctx, AVPacketSideData *sd)
     AVStereo3D *stereo;
 
     if (sd->size < sizeof(*stereo)) {
-        av_log(ctx, AV_LOG_INFO, "invalid data");
+        av_log(ctx, AV_LOG_ERROR, "invalid data");
         return;
     }
 
@@ -272,7 +272,7 @@  static void dump_audioservicetype(void *ctx, AVPacketSideData *sd)
     enum AVAudioServiceType *ast = (enum AVAudioServiceType *)sd->data;
 
     if (sd->size < sizeof(*ast)) {
-        av_log(ctx, AV_LOG_INFO, "invalid data");
+        av_log(ctx, AV_LOG_ERROR, "invalid data");
         return;
     }
 
@@ -315,7 +315,7 @@  static void dump_cpb(void *ctx, AVPacketSideData *sd)
     AVCPBProperties *cpb = (AVCPBProperties *)sd->data;
 
     if (sd->size < sizeof(*cpb)) {
-        av_log(ctx, AV_LOG_INFO, "invalid data");
+        av_log(ctx, AV_LOG_ERROR, "invalid data");
         return;
     }
 
@@ -357,7 +357,7 @@  static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *
     double yaw, pitch, roll;
 
     if (sd->size < sizeof(*spherical)) {
-        av_log(ctx, AV_LOG_INFO, "invalid data");
+        av_log(ctx, AV_LOG_ERROR, "invalid data");
         return;
     }