[FFmpeg-cvslog] avformat/omadec: simplify checks in nprobe()

Michael Niedermayer git at videolan.org
Tue Sep 24 01:31:29 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 24 00:29:02 2013 +0200| [fb45de779c8db142b44bf7b00c535ea2eee4f148] | committer: Michael Niedermayer

avformat/omadec: simplify checks in nprobe()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb45de779c8db142b44bf7b00c535ea2eee4f148
---

 libavformat/omadec.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index d0cb6d4..fe1f56e 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -171,11 +171,7 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size,
     taglen  = AV_RB32(&enc_header[pos + 32]);
     datalen = AV_RB32(&enc_header[pos + 36]) >> 4;
 
-    pos += 44;
-    if (size - pos < taglen)
-        return -1;
-
-    pos += taglen;
+    pos += 44L + taglen;
 
     if (pos + (((uint64_t)datalen) << 4) > size)
         return -1;



More information about the ffmpeg-cvslog mailing list