diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 20:44:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 20:47:00 +0200 |
commit | cf4dbe9affa1f40eccaf72213d9a3b6d71edb53b (patch) | |
tree | 152bc269509fd3a1c28b05a0f6d6acc18b4de1c4 /libavformat/xwma.c | |
parent | c31ad87bc6641d5dc3958237f4f23e5be4421982 (diff) | |
download | ffmpeg-cf4dbe9affa1f40eccaf72213d9a3b6d71edb53b.tar.gz |
avformat/xwma: improve error codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/xwma.c')
-rw-r--r-- | libavformat/xwma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/xwma.c b/libavformat/xwma.c index 057e86c56f..4b1af2b733 100644 --- a/libavformat/xwma.c +++ b/libavformat/xwma.c @@ -131,7 +131,7 @@ static int xwma_read_header(AVFormatContext *s) /* parse the remaining RIFF chunks */ for (;;) { if (pb->eof_reached) - return -1; + return AVERROR_EOF; /* read next chunk tag */ tag = avio_rl32(pb); size = avio_rl32(pb); @@ -152,7 +152,7 @@ static int xwma_read_header(AVFormatContext *s) /* Error out if there is more than one dpds chunk. */ if (dpds_table) { av_log(s, AV_LOG_ERROR, "two dpds chunks present\n"); - return -1; + return AVERROR_INVALIDDATA; } /* Compute the number of entries in the dpds chunk. */ @@ -164,7 +164,7 @@ static int xwma_read_header(AVFormatContext *s) if (dpds_table_size == 0 || dpds_table_size >= INT_MAX / 4) { av_log(s, AV_LOG_ERROR, "dpds chunk size %"PRId64" invalid\n", size); - return -1; + return AVERROR_INVALIDDATA; } /* Allocate some temporary storage to keep the dpds data around. @@ -185,7 +185,7 @@ static int xwma_read_header(AVFormatContext *s) /* Determine overall data length */ if (size < 0) - return -1; + return AVERROR_INVALIDDATA; if (!size) { xwma->data_end = INT64_MAX; } else |