Mercurial > libavcodec.hg
changeset 8791:7798afcf0b24 libavcodec
do not check for minimum slice start code, 0x00000100 is valid
author | stefang |
---|---|
date | Tue, 10 Feb 2009 16:34:45 +0000 |
parents | 1045a26cb90d |
children | b149d445bf4c |
files | cavs.h cavs_parser.c cavsdec.c |
diffstat | 3 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/cavs.h Tue Feb 10 14:27:16 2009 +0000 +++ b/cavs.h Tue Feb 10 16:34:45 2009 +0000 @@ -25,7 +25,6 @@ #include "dsputil.h" #include "mpegvideo.h" -#define SLICE_MIN_START_CODE 0x00000101 #define SLICE_MAX_START_CODE 0x000001af #define EXT_START_CODE 0x000001b5 #define USER_START_CODE 0x000001b2
--- a/cavs_parser.c Tue Feb 10 14:27:16 2009 +0000 +++ b/cavs_parser.c Tue Feb 10 16:34:45 2009 +0000 @@ -60,7 +60,7 @@ for(; i<buf_size; i++){ state= (state<<8) | buf[i]; if((state&0xFFFFFF00) == 0x100){ - if(state < SLICE_MIN_START_CODE || state > SLICE_MAX_START_CODE){ + if(state > SLICE_MAX_START_CODE){ pc->frame_start_found=0; pc->state=-1; return i-3;
--- a/cavsdec.c Tue Feb 10 14:27:16 2009 +0000 +++ b/cavsdec.c Tue Feb 10 16:34:45 2009 +0000 @@ -678,8 +678,7 @@ //mpeg_decode_user_data(avctx,buf_ptr, input_size); break; default: - if (stc >= SLICE_MIN_START_CODE && - stc <= SLICE_MAX_START_CODE) { + if (stc <= SLICE_MAX_START_CODE) { init_get_bits(&s->gb, buf_ptr, input_size); decode_slice_header(h, &s->gb); }