[FFmpeg-devel] Possible minor bug found in AVI decoder

Eric Beuque eric.beuque at gmail.com
Fri May 12 12:57:03 EEST 2017


2017-05-12 11:46 GMT+02:00 Paul B Mahol <onemda at gmail.com>:

> On 5/12/17, Eric Beuque <eric.beuque at gmail.com> wrote:
> > Hi,
> >
> > i'm not really sure but i think a found a bug in the avi decoder of
> > avformat.
> >
> > In the following function of the avidec.c:
> >
> > static int avi_read_header(AVFormatContext *s)
> > {
> >     ...
> >         switch (tag) {
> >             ...
> >         case MKTAG('s', 't', 'r', 'f'):
> >             /* stream header */
> >             if (!size)
> >                 break;
> >             if (stream_index >= (unsigned)s->nb_streams ||
> avi->dv_demux) {
> >                 avio_skip(pb, size);
> >             } else {
> >                 ...
> >                 switch (codec_type) {
> >                 ...
> >                 default:
> >                     st->codec->codec_type = AVMEDIA_TYPE_DATA;
> >                     st->codec->codec_id   = AV_CODEC_ID_NONE;
> >                     st->codec->codec_tag  = 0;
> >                     avio_skip(pb, size);
> >                     break;
> >                 }
> >             }
> >             break;
> >         ...
> > }
> >
> > If the codec_type is AVMEDIA_TYPE_DATA, but the format is empty (size=0)
> > (which i think is allowed), then the codec_id is not set to
> > AV_CODEC_ID_NONE.
> >
> > This will generate a trace when calling the avformat_find_stream_info:
> > "Could not find codec parameters for stream 1 (Unknown: none): unknown
> codec
> > Consider increasing the value for the 'analyzeduration' and 'probesize'
> > options"
> >
> > I'm not really sure about he AVI spec if the format is mandatory or not,
> > but i think there is a bug.
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
>
> AVI is not decoder
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Yes, i mean the demuxer, sorry (i mistake because the file is called
avidec.c).


More information about the ffmpeg-devel mailing list