[FFmpeg-devel] [PATCH] avformat: add vividas demuxer

Tomas Härdin tjoppen at acc.umu.se
Wed Dec 19 13:27:52 EET 2018


tis 2018-12-18 klockan 22:58 +0100 skrev Paul B Mahol:
> > On 12/18/18, Tomas Härdin <tjoppen at acc.umu.se> wrote:
> > sön 2018-12-16 klockan 22:28 +0100 skrev Paul B Mahol:
> > > > 
> > > 
> > > +static void track_header(VividasDemuxContext *viv, AVFormatContext
> > > *s,  uint8_t *buf, int size)
> > > +{
> > > +[...]
> > > +        if (avio_tell(pb) < off) {
> > > +            int num_data;
> > > +            int xd_size = 0;
> > > +            int data_len[256];
> > > +            int offset = 1;
> > > +            uint8_t *p;
> > > +            ffio_read_varlen(pb); // val_13
> > > +            avio_r8(pb); // '19'
> > > +            ffio_read_varlen(pb); // len_3
> > > +            num_data = avio_r8(pb);
> > > +            for (j = 0; j < num_data; j++) {
> > > +                data_len[j] = ffio_read_varlen(pb);
> > > +                xd_size += data_len[j];
> > > +            }
> > > +
> > > +            st->codecpar->extradata_size = 64 + xd_size + xd_size / 255;
> > > +            st->codecpar->extradata =
> > > av_mallocz(st->codecpar->extradata_size);
> > 
> > This is missing padding by AV_INPUT_BUFFER_PADDING_SIZE
> 
> Fixed locally. If thats all, I will apply it.

Nothing else popped out to me at least

/Tomas


More information about the ffmpeg-devel mailing list