summaryrefslogtreecommitdiff
path: root/libavformat/vc1test.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/vc1test.c')
-rw-r--r--libavformat/vc1test.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 859188f372..e5303fa46e 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -2,20 +2,20 @@
* 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
*/
@@ -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)
@@ -92,7 +91,7 @@ static int vc1t_read_packet(AVFormatContext *s,
int keyframe = 0;
uint32_t pts;
- if(pb->eof_reached)
+ if(url_feof(pb))
return AVERROR(EIO);
frame_size = avio_rl24(pb);