Revision ce5e49b0 libavcodec/h263dec.c

View differences:

libavcodec/h263dec.c
218 218
//printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
219 219
            ret= s->decode_mb(s, s->block);
220 220

  
221
            if (s->pict_type!=FF_B_TYPE)
221
            if (s->pict_type!=AV_PICTURE_TYPE_B)
222 222
                ff_h263_update_motion_val(s);
223 223

  
224 224
            if(ret<0){
......
310 310
        int max_extra=7;
311 311

  
312 312
        /* no markers in M$ crap */
313
        if(s->msmpeg4_version && s->pict_type==FF_I_TYPE)
313
        if(s->msmpeg4_version && s->pict_type==AV_PICTURE_TYPE_I)
314 314
            max_extra+= 17;
315 315

  
316 316
        /* buggy padding but the frame should still end approximately at the bitstream end */
......
600 600

  
601 601
    // for skipping the frame
602 602
    s->current_picture.pict_type= s->pict_type;
603
    s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
603
    s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
604 604

  
605 605
    /* skip B-frames if we don't have reference frames */
606
    if(s->last_picture_ptr==NULL && (s->pict_type==FF_B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size);
607
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
608
       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
606
    if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)) return get_consumed_bytes(s, buf_size);
607
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
608
       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
609 609
       ||  avctx->skip_frame >= AVDISCARD_ALL)
610 610
        return get_consumed_bytes(s, buf_size);
611 611

  
612 612
    if(s->next_p_frame_damaged){
613
        if(s->pict_type==FF_B_TYPE)
613
        if(s->pict_type==AV_PICTURE_TYPE_B)
614 614
            return get_consumed_bytes(s, buf_size);
615 615
        else
616 616
            s->next_p_frame_damaged=0;
617 617
    }
618 618

  
619
    if((s->avctx->flags2 & CODEC_FLAG2_FAST) && s->pict_type==FF_B_TYPE){
619
    if((s->avctx->flags2 & CODEC_FLAG2_FAST) && s->pict_type==AV_PICTURE_TYPE_B){
620 620
        s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
621 621
        s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
622
    }else if((!s->no_rounding) || s->pict_type==FF_B_TYPE){
622
    }else if((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
623 623
        s->me.qpel_put= s->dsp.put_qpel_pixels_tab;
624 624
        s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab;
625 625
    }else{
......
672 672
        decode_slice(s);
673 673
    }
674 674

  
675
    if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE)
675
    if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==AV_PICTURE_TYPE_I)
676 676
        if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
677 677
            s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
678 678
        }
......
722 722

  
723 723
assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
724 724
assert(s->current_picture.pict_type == s->pict_type);
725
    if (s->pict_type == FF_B_TYPE || s->low_delay) {
725
    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
726 726
        *pict= *(AVFrame*)s->current_picture_ptr;
727 727
    } else if (s->last_picture_ptr != NULL) {
728 728
        *pict= *(AVFrame*)s->last_picture_ptr;

Also available in: Unified diff