summaryrefslogtreecommitdiff
path: root/libavcodec/libvpxenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-10 02:13:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-10 02:16:33 +0100
commit529d3e002642a9901ae463dea0263768dc843173 (patch)
treee022885e2b9c1cee95c30aa2ed53a2ab56831f01 /libavcodec/libvpxenc.c
parenta93369845783a5a63e713c143cab2c550a6ccd82 (diff)
parent2dd95bd7cfd1acbbac8844739572667f40314b79 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: dsputil: remove unused macro WRAPPER8_16 configure: fix automatic processing of _extralibs in check_deps libvpxenc: Support forcing keyframes ac3dec: decode directly into output buffers Conflicts: libavcodec/ac3dec.c libavcodec/libvpxenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libvpxenc.c')
-rw-r--r--libavcodec/libvpxenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 320f5f81bd..0de11b5448 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -527,8 +527,8 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
VP8Context *ctx = avctx->priv_data;
struct vpx_image *rawimg = NULL;
int64_t timestamp = 0;
- long flags = 0;
int res, coded_size;
+ vpx_enc_frame_flags_t flags = 0;
if (frame) {
rawimg = &ctx->rawimg;
@@ -539,7 +539,8 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
rawimg->stride[VPX_PLANE_U] = frame->linesize[1];
rawimg->stride[VPX_PLANE_V] = frame->linesize[2];
timestamp = frame->pts;
- flags = frame->pict_type == AV_PICTURE_TYPE_I ? VPX_EFLAG_FORCE_KF : 0;
+ if (frame->pict_type == AV_PICTURE_TYPE_I)
+ flags |= VPX_EFLAG_FORCE_KF;
}
res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,