summaryrefslogtreecommitdiff
path: root/libavcodec/mlp_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-14 03:43:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-14 03:48:22 +0200
commit91eb1b1525456efecc3154ca533b943d2916886e (patch)
tree34eb85a4cd6dbc0badfddc3da33038798da9d40a /libavcodec/mlp_parser.c
parent90705aabe1a0b947d25f2a1d5fcbad85cfdfbc2c (diff)
parenta62d36697d3cefc705736d21fcaede425147b5f0 (diff)
downloadffmpeg-91eb1b1525456efecc3154ca533b943d2916886e.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits) prores: add FATE tests id3v2: reduce the scope of some non-globally-used symbols/structures id3v2: cosmetics: move some declarations before the places they are used shorten: remove the flush function. shn: do not allow seeking in the raw shn demuxer. avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK. avformat: update AVInputFormat allowed flags avformat: don't unconditionally call ff_read_frame_flush() when trying to seek. truespeech: use sizeof() instead of hardcoded sizes truespeech: remove unneeded variable, 'consumed' truespeech: simplify truespeech_read_frame() by using get_bits() truespeech: decode directly to output buffer instead of a temp buffer truespeech: check to make sure channels == 1 truespeech: check for large enough output buffer rather than truncating output truespeech: remove unneeded zero-size packet check. mlpdec: return meaningful error codes instead of -1 mlpdec: remove unnecessary wrapper function mlpdec: only calculate output size once mlpdec: validate that the reported channel count matches the actual output channel count pcm: reduce pointer type casting ... Conflicts: libavformat/avformat.h libavformat/id3v2.c libavformat/id3v2.h libavformat/utils.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlp_parser.c')
-rw-r--r--libavcodec/mlp_parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index a6bdc0c0a5..abd3ffa8e7 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);