From d934de5c5d9ff1d228d0113e31e182efe2a853aa Mon Sep 17 00:00:00 2001 From: Stefan Gehrer Date: Tue, 10 Feb 2009 16:34:45 +0000 Subject: [PATCH] do not check for minimum slice start code, 0x00000100 is valid Originally committed as revision 17133 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/cavs.h | 1 - libavcodec/cavs_parser.c | 2 +- libavcodec/cavsdec.c | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 885a2cd..8d07aed 100644 --- a/libavcodec/cavs.h +++ b/libavcodec/cavs.h @@ -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 diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c index 6604b1b..6d19e1f 100644 --- a/libavcodec/cavs_parser.c +++ b/libavcodec/cavs_parser.c @@ -60,7 +60,7 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, for(; i SLICE_MAX_START_CODE){ + if(state > SLICE_MAX_START_CODE){ pc->frame_start_found=0; pc->state=-1; return i-3; diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 4092f88..dbbe2d9 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -678,8 +678,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, //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); } -- 2.7.4