[FFmpeg-devel] [PATCH] wavdec: make it possible to continue decoding if invalid tags are detected

Paul B Mahol onemda at gmail.com
Thu Oct 18 11:16:29 CEST 2012


On 10/18/12, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> On Thu, Oct 18, 2012 at 1:04 AM, Paul B Mahol <onemda at gmail.com> wrote:
>> Fixes #1821.
>>
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>  libavformat/wavdec.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
>> index 7a54b1b..a945547 100644
>> --- a/libavformat/wavdec.c
>> +++ b/libavformat/wavdec.c
>> @@ -346,7 +346,8 @@ static int wav_read_header(AVFormatContext *s)
>>              }
>>              switch (avio_rl32(pb)) {
>>              case MKTAG('I', 'N', 'F', 'O'):
>> -                if ((ret = ff_read_riff_info(s, size - 4)) < 0)
>> +                if ((ret = ff_read_riff_info(s, size - 4)) < 0 &&
>> +                     s->error_recognition & AV_EF_COMPLIANT)
>
> Shouldn't this be AV_EF_EXPLODE?

explode is for minor error detections.

I do not think explode should be used for this one, and explode
is overrused through FFmpeg code.

I'm all for making distiction more clear and documented in header
and not only in options.
>
>>                      return ret;
>>              }
>>              break;
>> --
>> 1.7.11.2
>>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list