| ... | ... |
@@ -230,10 +230,9 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, |
| 230 | 230 |
pfptr = s->previous_frame; |
| 231 | 231 |
|
| 232 | 232 |
/* Check the placement of keyframes */ |
| 233 |
- if (avctx->gop_size > 0) {
|
|
| 234 |
- if (avctx->frame_number >= s->last_key_frame + avctx->gop_size) {
|
|
| 235 |
- I_frame = 1; |
|
| 236 |
- } |
|
| 233 |
+ if (avctx->gop_size > 0 && |
|
| 234 |
+ avctx->frame_number >= s->last_key_frame + avctx->gop_size) {
|
|
| 235 |
+ I_frame = 1; |
|
| 237 | 236 |
} |
| 238 | 237 |
|
| 239 | 238 |
if (buf_size < s->image_width * s->image_height * 3) {
|