In RV3/4 nonzero MB offset for the first slice also indicates error

Originally committed as revision 17201 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Kostya Shishkov 16 years ago
parent e15421fe2b
commit 86dd3974e5
  1. 2
      libavcodec/rv34.c

@ -1402,7 +1402,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
return -1; return -1;
} }
init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, 0), buf_size-get_slice_offset(avctx, slices_hdr, 0)); init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, 0), buf_size-get_slice_offset(avctx, slices_hdr, 0));
if(r->parse_slice_header(r, &r->s.gb, &si) < 0){ if(r->parse_slice_header(r, &r->s.gb, &si) < 0 || si.start){
av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n"); av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
return -1; return -1;
} }

Loading…
Cancel
Save