diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/vc1test.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/vc1test.c')
| -rw-r--r-- | ffmpeg/libavformat/vc1test.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ffmpeg/libavformat/vc1test.c b/ffmpeg/libavformat/vc1test.c index e411a25..e5303fa 100644 --- a/ffmpeg/libavformat/vc1test.c +++ b/ffmpeg/libavformat/vc1test.c @@ -39,7 +39,7 @@ static int vc1t_probe(AVProbeData *p) if (p->buf[3] != 0xC5 || AV_RL32(&p->buf[4]) != 4 || AV_RL32(&p->buf[20]) != 0xC) return 0; - return AVPROBE_SCORE_MAX/2; + return AVPROBE_SCORE_EXTENSION; } static int vc1t_read_header(AVFormatContext *s) @@ -61,9 +61,8 @@ static int vc1t_read_header(AVFormatContext *s) st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = AV_CODEC_ID_WMV3; - st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE); - st->codec->extradata_size = VC1_EXTRADATA_SIZE; - avio_read(pb, st->codec->extradata, VC1_EXTRADATA_SIZE); + if (ff_get_extradata(st->codec, pb, VC1_EXTRADATA_SIZE) < 0) + return AVERROR(ENOMEM); st->codec->height = avio_rl32(pb); st->codec->width = avio_rl32(pb); if(avio_rl32(pb) != 0xC) |
