Revision b44c8ad2 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
998 998
        s->pict_type, s->dropable);*/
999 999

  
1000 1000
    if(s->codec_id != CODEC_ID_H264){
1001
        if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && s->pict_type!=AV_PICTURE_TYPE_I){
1002
            av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
1001
        if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) &&
1002
           (s->pict_type!=AV_PICTURE_TYPE_I || s->picture_structure != PICT_FRAME)){
1003
            if (s->pict_type != AV_PICTURE_TYPE_I)
1004
                av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
1005
            else if (s->picture_structure != PICT_FRAME)
1006
                av_log(avctx, AV_LOG_INFO, "allocate dummy last picture for field based first keyframe\n");
1007

  
1003 1008
            /* Allocate a dummy frame */
1004 1009
            i= ff_find_unused_picture(s, 0);
1005 1010
            s->last_picture_ptr= &s->picture[i];

Also available in: Unified diff