[FFmpeg-devel] [PATCH] avformat: add vividas demuxer
Tomas Härdin
tjoppen at acc.umu.se
Tue Dec 18 13:29:50 EET 2018
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
/Tomas
More information about the ffmpeg-devel
mailing list