Mercurial > libavcodec.hg
comparison ffv1.c @ 2218:cff6c9b8ae57 libavcodec
put the warning to the right place to avoid crashes
author | alex |
---|---|
date | Fri, 10 Sep 2004 15:38:14 +0000 |
parents | 2a767157935e |
children | 21947e176d4d |
comparison
equal
deleted
inserted
replaced
2217:9492be49de46 | 2218:cff6c9b8ae57 |
---|---|
535 static int encode_init(AVCodecContext *avctx) | 535 static int encode_init(AVCodecContext *avctx) |
536 { | 536 { |
537 FFV1Context *s = avctx->priv_data; | 537 FFV1Context *s = avctx->priv_data; |
538 int i; | 538 int i; |
539 | 539 |
540 if(avctx->strict_std_compliance >= 0){ | |
541 av_log(avctx, AV_LOG_ERROR, "this codec is under development, files encoded with it wont be decodeable with future versions!!!\n" | |
542 "use vstrict=-1 to use it anyway\n"); | |
543 return -1; | |
544 } | |
545 | |
540 common_init(avctx); | 546 common_init(avctx); |
541 | 547 |
542 s->version=0; | 548 s->version=0; |
543 s->ac= avctx->coder_type; | 549 s->ac= avctx->coder_type; |
544 | 550 |
627 const int width= f->width; | 633 const int width= f->width; |
628 const int height= f->height; | 634 const int height= f->height; |
629 AVFrame * const p= &f->picture; | 635 AVFrame * const p= &f->picture; |
630 int used_count= 0; | 636 int used_count= 0; |
631 | 637 |
632 if(avctx->strict_std_compliance >= 0){ | |
633 av_log(avctx, AV_LOG_ERROR, "this codec is under development, files encoded with it wont be decodeable with future versions!!!\n" | |
634 "use vstrict=-1 to use it anyway\n"); | |
635 return -1; | |
636 } | |
637 | |
638 ff_init_cabac_encoder(c, buf, buf_size); | 638 ff_init_cabac_encoder(c, buf, buf_size); |
639 ff_init_cabac_states(c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64); | 639 ff_init_cabac_states(c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64); |
640 c->lps_state[2] = 1; | 640 c->lps_state[2] = 1; |
641 c->lps_state[3] = 0; | 641 c->lps_state[3] = 0; |
642 | 642 |