comparison rv34.c @ 8821:58706d84c938 libavcodec

In RV3/4 nonzero MB offset for the first slice also indicates error
author kostya
date Fri, 13 Feb 2009 07:06:36 +0000
parents f471abd09fef
children 03ea23e85f42
comparison
equal deleted inserted replaced
8820:7400956a815d 8821:58706d84c938
1400 if(get_slice_offset(avctx, slices_hdr, 0) > buf_size){ 1400 if(get_slice_offset(avctx, slices_hdr, 0) > buf_size){
1401 av_log(avctx, AV_LOG_ERROR, "Slice offset is greater than frame size\n"); 1401 av_log(avctx, AV_LOG_ERROR, "Slice offset is greater than frame size\n");
1402 return -1; 1402 return -1;
1403 } 1403 }
1404 init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, 0), buf_size-get_slice_offset(avctx, slices_hdr, 0)); 1404 init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, 0), buf_size-get_slice_offset(avctx, slices_hdr, 0));
1405 if(r->parse_slice_header(r, &r->s.gb, &si) < 0){ 1405 if(r->parse_slice_header(r, &r->s.gb, &si) < 0 || si.start){
1406 av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n"); 1406 av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
1407 return -1; 1407 return -1;
1408 } 1408 }
1409 if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE) 1409 if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE)
1410 return -1; 1410 return -1;