* VC1 Test Bitstreams Format Demuxer
* Copyright (c) 2006, 2008 Konstantin Shishkov
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
st->codecpar->codec_id = AV_CODEC_ID_WMV3;
- st->codecpar->extradata = av_malloc(VC1_EXTRADATA_SIZE);
- if (!st->codecpar->extradata)
+ if (ff_get_extradata(st->codecpar, pb, VC1_EXTRADATA_SIZE) < 0)
return AVERROR(ENOMEM);
- st->codecpar->extradata_size = VC1_EXTRADATA_SIZE;
- avio_read(pb, st->codecpar->extradata, VC1_EXTRADATA_SIZE);
st->codecpar->height = avio_rl32(pb);
st->codecpar->width = avio_rl32(pb);
if(avio_rl32(pb) != 0xC)
int keyframe = 0;
uint32_t pts;
- if(pb->eof_reached)
+ if(avio_feof(pb))
return AVERROR(EIO);
frame_size = avio_rl24(pb);