Browse code

do not check for minimum slice start code, 0x00000100 is valid

Originally committed as revision 17133 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefan Gehrer authored on 2009/02/11 01:34:45
Showing 3 changed files
... ...
@@ -25,7 +25,6 @@
25 25
 #include "dsputil.h"
26 26
 #include "mpegvideo.h"
27 27
 
28
-#define SLICE_MIN_START_CODE    0x00000101
29 28
 #define SLICE_MAX_START_CODE    0x000001af
30 29
 #define EXT_START_CODE          0x000001b5
31 30
 #define USER_START_CODE         0x000001b2
... ...
@@ -60,7 +60,7 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf,
60 60
         for(; i<buf_size; i++){
61 61
             state= (state<<8) | buf[i];
62 62
             if((state&0xFFFFFF00) == 0x100){
63
-                if(state < SLICE_MIN_START_CODE || state > SLICE_MAX_START_CODE){
63
+                if(state > SLICE_MAX_START_CODE){
64 64
                     pc->frame_start_found=0;
65 65
                     pc->state=-1;
66 66
                     return i-3;
... ...
@@ -678,8 +678,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
678 678
             //mpeg_decode_user_data(avctx,buf_ptr, input_size);
679 679
             break;
680 680
         default:
681
-            if (stc >= SLICE_MIN_START_CODE &&
682
-                stc <= SLICE_MAX_START_CODE) {
681
+            if (stc <= SLICE_MAX_START_CODE) {
683 682
                 init_get_bits(&s->gb, buf_ptr, input_size);
684 683
                 decode_slice_header(h, &s->gb);
685 684
             }