aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-02-06 10:46:53 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-02-06 20:33:06 +0100
commite8a06b14864901ddd2ad87b977fd1df8e2ed0050 (patch)
treef6d75c76f032df00575b386ac717ad334201a717
parent2cbe9121ace40e1354d023624fef30a9e21fb7b1 (diff)
downloadffmpeg-e8a06b14864901ddd2ad87b977fd1df8e2ed0050.tar.gz
lavf/4xm: use proper error codes
-rw-r--r--libavformat/4xm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 342c22c169..ef87b3b23a 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -169,7 +169,7 @@ static int fourxm_read_header(AVFormatContext *s)
current_track = AV_RL32(&header[i + 8]);
if((unsigned)current_track >= UINT_MAX / sizeof(AudioTrack) - 1){
av_log(s, AV_LOG_ERROR, "current_track too large\n");
- ret= -1;
+ ret = AVERROR_INVALIDDATA;
goto fail;
}
if (current_track + 1 > fourxm->track_count) {
@@ -193,7 +193,7 @@ static int fourxm_read_header(AVFormatContext *s)
|| fourxm->tracks[current_track].sample_rate <= 0
|| fourxm->tracks[current_track].bits < 0){
av_log(s, AV_LOG_ERROR, "audio header invalid\n");
- ret= -1;
+ ret = AVERROR_INVALIDDATA;
goto fail;
}
i += 8 + size;