Browse Source

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

Originally committed as revision 17133 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Stefan Gehrer 16 years ago
parent
commit
d934de5c5d
3 changed files with 2 additions and 4 deletions
  1. +0
    -1
      libavcodec/cavs.h
  2. +1
    -1
      libavcodec/cavs_parser.c
  3. +1
    -2
      libavcodec/cavsdec.c

+ 0
- 1
libavcodec/cavs.h View File

@@ -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


+ 1
- 1
libavcodec/cavs_parser.c View File

@@ -60,7 +60,7 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf,
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;


+ 1
- 2
libavcodec/cavsdec.c View File

@@ -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);
}


Loading…
Cancel
Save