summaryrefslogtreecommitdiff
path: root/libavformat/mpc8.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-30 07:29:34 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-31 20:54:22 +0200
commitf2ed006c90ccb65cd143d8b0fcfc28ffb98c4289 (patch)
tree059711fd9ac78b221cbfcfc3d209f1a75030cc0b /libavformat/mpc8.c
parent263dbe9d953bfa717cd46698511cdcdc3d5d74b1 (diff)
mpc8: return more meaningful error codes.
Diffstat (limited to 'libavformat/mpc8.c')
-rw-r--r--libavformat/mpc8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 6b9f77e6ab..b6837c52f7 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -202,7 +202,7 @@ static int mpc8_read_header(AVFormatContext *s)
c->header_pos = avio_tell(pb);
if(avio_rl32(pb) != TAG_MPCK){
av_log(s, AV_LOG_ERROR, "Not a Musepack8 file\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
while(!pb->eof_reached){
@@ -214,14 +214,14 @@ static int mpc8_read_header(AVFormatContext *s)
}
if(tag != TAG_STREAMHDR){
av_log(s, AV_LOG_ERROR, "Stream header not found\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
pos = avio_tell(pb);
avio_skip(pb, 4); //CRC
c->ver = avio_r8(pb);
if(c->ver != 8){
av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
- return -1;
+ return AVERROR_PATCHWELCOME;
}
c->samples = ffio_read_varlen(pb);
ffio_read_varlen(pb); //silence samples at the beginning