H.261 does not have keyframes (or indeed frame types) at all, so this warning is not warranted. Also remove an always-true check while at it.
Unified · Split
| @@ -380,7 +380,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 379 unmodified lines | ||
| 380 | 380 | if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture_ptr && s->next_picture_ptr->f->buf[0]) |
| 381 | 381 | av_log(avctx, AV_LOG_DEBUG, |
| 382 | 382 | "allocating dummy last picture for B frame\n"); |
| 383 | − else if (s->pict_type != AV_PICTURE_TYPE_I) | |
| 383 | + else if (s->codec_id != AV_CODEC_ID_H261) | |
| 384 | 384 | av_log(avctx, AV_LOG_ERROR, |
| 385 | 385 | "warning: first frame is no keyframe\n"); |
| 386 | 386 | |