Karl Blomster <thefl...@uppcon.com> added the comment:
Actually, ok. Removing .7z and adding files separately.
_____________________________________________________
FFmpeg issue tracker <iss...@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1233>
_____________________________________________________
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/log.h>
#include <stdio.h>
#include <stdint.h>
int main (void) {
AVCodec *codec;
AVCodecContext *cc;
uint8_t *buf;
FILE *data;
long fsz;
int ret;
av_register_all();
av_log_set_level(AV_LOG_ERROR);
cc = avcodec_alloc_context2(CODEC_TYPE_VIDEO);
codec = avcodec_find_decoder(CODEC_ID_VC1);
data = fopen("extradata.bin", "rb");
fseek(data, 0, SEEK_END);
fsz = ftell(data);
rewind(data);
buf = malloc(fsz);
fread(buf, 1, fsz, data);
cc->extradata = buf;
cc->extradata_size = fsz;
fclose(data);
ret = avcodec_open(cc, codec);
printf("avcodec_open returned: %d\n", ret);
avcodec_close(cc);
ret = avcodec_open(cc, codec);
printf("avcodec_open returned: %d\n", ret);
avcodec_close(cc);
return 0;
}