diff --git a/src/ffmpeg.c b/src/ffmpeg.c index 988d662..451d3da 100644 --- a/src/ffmpeg.c +++ b/src/ffmpeg.c @@ -1495,11 +1495,11 @@ int ffmpeg_put_image(struct ffmpeg *ffmpeg, struct image_data *img_data, const s ffmpeg->gop_cnt ++; if (ffmpeg->gop_cnt == ffmpeg->ctx_codec->gop_size ) { ffmpeg->picture->pict_type = AV_PICTURE_TYPE_I; - ffmpeg->picture->key_frame = 1; + ffmpeg->picture->flags |= AV_FRAME_FLAG_KEY; ffmpeg->gop_cnt = 0; } else { ffmpeg->picture->pict_type = AV_PICTURE_TYPE_P; - ffmpeg->picture->key_frame = 0; + ffmpeg->picture->flags &= ~AV_FRAME_FLAG_KEY; } /* A return code of -2 is thrown by the put_frame