Revision 99e07a44 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
1094 1094
        s->pict_type, s->dropable);*/
1095 1095

  
1096 1096
    if(s->codec_id != CODEC_ID_H264){
1097
        if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && s->pict_type!=AV_PICTURE_TYPE_I){
1098
            av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
1097
        if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) &&
1098
           (s->pict_type!=AV_PICTURE_TYPE_I || s->picture_structure != PICT_FRAME)){
1099
            if (s->pict_type != AV_PICTURE_TYPE_I)
1100
                av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
1101
            else if (s->picture_structure != PICT_FRAME)
1102
                av_log(avctx, AV_LOG_INFO, "allocate dummy last picture for field based first keyframe\n");
1103

  
1099 1104
            /* Allocate a dummy frame */
1100 1105
            i= ff_find_unused_picture(s, 0);
1101 1106
            s->last_picture_ptr= &s->picture[i];

Also available in: Unified diff