Commit 77fc7b76 authored by Nidhi Makhijani's avatar Nidhi Makhijani Committed by Diego Biurrun
Browse files

vc1test: Return proper error codes


Signed-off-by: default avatarDiego Biurrun <diego@biurrun.de>
parent 86546109
......@@ -51,12 +51,12 @@ static int vc1t_read_header(AVFormatContext *s)
frames = avio_rl24(pb);
if(avio_r8(pb) != 0xC5 || avio_rl32(pb) != 4)
return -1;
return AVERROR_INVALIDDATA;
/* init video codec */
st = avformat_new_stream(s, NULL);
if (!st)
return -1;
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = AV_CODEC_ID_WMV3;
......@@ -67,7 +67,7 @@ static int vc1t_read_header(AVFormatContext *s)
st->codec->height = avio_rl32(pb);
st->codec->width = avio_rl32(pb);
if(avio_rl32(pb) != 0xC)
return -1;
return AVERROR_INVALIDDATA;
avio_skip(pb, 8);
fps = avio_rl32(pb);
if(fps == 0xFFFFFFFF)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment