changeset 8503:7c82ed8d4824 libavcodec

Explain the lack of +3/7
author michael
date Sun, 28 Dec 2008 23:26:12 +0000
parents e6909fa99317
children 3bfb7a2ea222
files h264_parser.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h264_parser.c	Sun Dec 28 20:08:39 2008 +0000
+++ b/h264_parser.c	Sun Dec 28 23:26:12 2008 +0000
@@ -45,6 +45,9 @@
     for(i=0; i<buf_size; i++){
         if(state==7){
 #ifdef HAVE_FAST_UNALIGNED
+        /* we check i<buf_size instead of i+3/7 because its simpler
+         * and there should be FF_INPUT_BUFFER_PADDING_SIZE bytes at the end
+         */
 #    ifdef HAVE_FAST_64BIT
             while(i<buf_size && !((~*(uint64_t*)(buf+i) & (*(uint64_t*)(buf+i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL))
                 i+=8;