1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

Merge commit '77fc7b76726719746ca45df6c4a62c41abad506e'

* commit '77fc7b76726719746ca45df6c4a62c41abad506e':
  vc1test: Return proper error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-07-06 19:24:57 +02:00

View File

@@ -51,12 +51,12 @@ static int vc1t_read_header(AVFormatContext *s)
frames = avio_rl24(pb); frames = avio_rl24(pb);
if(avio_r8(pb) != 0xC5 || avio_rl32(pb) != 4) if(avio_r8(pb) != 0xC5 || avio_rl32(pb) != 4)
return -1; return AVERROR_INVALIDDATA;
/* init video codec */ /* init video codec */
st = avformat_new_stream(s, NULL); st = avformat_new_stream(s, NULL);
if (!st) if (!st)
return -1; return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = AV_CODEC_ID_WMV3; st->codec->codec_id = AV_CODEC_ID_WMV3;
@@ -66,7 +66,7 @@ static int vc1t_read_header(AVFormatContext *s)
st->codec->height = avio_rl32(pb); st->codec->height = avio_rl32(pb);
st->codec->width = avio_rl32(pb); st->codec->width = avio_rl32(pb);
if(avio_rl32(pb) != 0xC) if(avio_rl32(pb) != 0xC)
return -1; return AVERROR_INVALIDDATA;
avio_skip(pb, 8); avio_skip(pb, 8);
fps = avio_rl32(pb); fps = avio_rl32(pb);
if(fps == 0xFFFFFFFF) if(fps == 0xFFFFFFFF)