You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/xwma: return always proper error codes
This commit is contained in:
@@ -60,16 +60,16 @@ static int xwma_read_header(AVFormatContext *s)
|
|||||||
/* check RIFF header */
|
/* check RIFF header */
|
||||||
tag = avio_rl32(pb);
|
tag = avio_rl32(pb);
|
||||||
if (tag != MKTAG('R', 'I', 'F', 'F'))
|
if (tag != MKTAG('R', 'I', 'F', 'F'))
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
avio_rl32(pb); /* file size */
|
avio_rl32(pb); /* file size */
|
||||||
tag = avio_rl32(pb);
|
tag = avio_rl32(pb);
|
||||||
if (tag != MKTAG('X', 'W', 'M', 'A'))
|
if (tag != MKTAG('X', 'W', 'M', 'A'))
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
/* parse fmt header */
|
/* parse fmt header */
|
||||||
tag = avio_rl32(pb);
|
tag = avio_rl32(pb);
|
||||||
if (tag != MKTAG('f', 'm', 't', ' '))
|
if (tag != MKTAG('f', 'm', 't', ' '))
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
size = avio_rl32(pb);
|
size = avio_rl32(pb);
|
||||||
st = avformat_new_stream(s, NULL);
|
st = avformat_new_stream(s, NULL);
|
||||||
if (!st)
|
if (!st)
|
||||||
|
Reference in New Issue
Block a user