diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-12 22:47:50 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-13 15:13:02 -0400 |
commit | 82be06bbb348bde16ed6e13ccbafac5f9264c478 (patch) | |
tree | 5046d38ceeb6bc5089c85f26752d2b08985dc9b1 /libavcodec/mlp_parser.c | |
parent | e1b8d88d52028a1c064dc1c2c96c1e0b200c73a1 (diff) | |
download | ffmpeg-82be06bbb348bde16ed6e13ccbafac5f9264c478.tar.gz |
mlpdec: return meaningful error codes instead of -1
Diffstat (limited to 'libavcodec/mlp_parser.c')
-rw-r--r-- | libavcodec/mlp_parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c index e85eb72c38..e1f4c5610e 100644 --- a/libavcodec/mlp_parser.c +++ b/libavcodec/mlp_parser.c @@ -138,11 +138,11 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb) checksum = ff_mlp_checksum16(gb->buffer, 26); if (checksum != AV_RL16(gb->buffer+26)) { av_log(log, AV_LOG_ERROR, "major sync info header checksum error\n"); - return -1; + return AVERROR_INVALIDDATA; } if (get_bits_long(gb, 24) != 0xf8726f) /* Sync words */ - return -1; + return AVERROR_INVALIDDATA; mh->stream_type = get_bits(gb, 8); @@ -173,7 +173,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb) mh->channels_thd_stream2 = get_bits(gb, 13); } else - return -1; + return AVERROR_INVALIDDATA; mh->access_unit_size = 40 << (ratebits & 7); mh->access_unit_size_pow2 = 64 << (ratebits & 7); |