aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2015-01-09 10:09:04 +1100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-09 00:50:45 +0100
commit624384503643f1d3fd2e8f8f9b986ddcf2067a21 (patch)
treee4d4deca57ded8003f40824902de879c10ba8c52
parentcd3405282c7007a535b297d14e50e4ff12c18679 (diff)
downloadffmpeg-624384503643f1d3fd2e8f8f9b986ddcf2067a21.tar.gz
avformat/aiffdec: improve readability
Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/aiffdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 8dbed327b6..301d90f00a 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -116,12 +116,12 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size,
size -= 18;
/* get codec id for AIFF-C */
- if (version == AIFF_C_VERSION1 && size >= 4) {
+ if (size < 4) {
+ version = AIFF;
+ } else if (version == AIFF_C_VERSION1) {
codec->codec_tag = avio_rl32(pb);
codec->codec_id = ff_codec_get_id(ff_codec_aiff_tags, codec->codec_tag);
size -= 4;
- } else {
- version = AIFF;
}
if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) {