summaryrefslogtreecommitdiff
path: root/libavcodec/libxvid.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-20 22:01:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-20 22:01:44 +0200
commit70c648db8948b11a86699f22e883b7310ccae6ce (patch)
tree9221c911996f775216230d8f0bb15d4cd65c4c31 /libavcodec/libxvid.c
parent033144c0d13c6e83e128f1cd5e1d460be94bace0 (diff)
parent7fc8d8a1b3da1666176b3d92e989ee74f3ef014e (diff)
downloadffmpeg-70c648db8948b11a86699f22e883b7310ccae6ce.tar.gz
Merge commit '7fc8d8a1b3da1666176b3d92e989ee74f3ef014e'
* commit '7fc8d8a1b3da1666176b3d92e989ee74f3ef014e': libxvid: Do not entangle coded_frame Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/libxvid.c')
-rw-r--r--libavcodec/libxvid.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index bd88326c06..e0e7cbd024 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -692,7 +692,6 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{
int xerr, i, ret, user_packet = !!pkt->data;
struct xvid_context *x = avctx->priv_data;
- AVFrame *p = avctx->coded_frame;
int mb_width = (avctx->width + 15) / 16;
int mb_height = (avctx->height + 15) / 16;
char *tmp;
@@ -777,23 +776,24 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (xerr > 0) {
*got_packet = 1;
- p->quality = xvid_enc_stats.quant * FF_QP2LAMBDA;
+ avctx->coded_frame->quality = xvid_enc_stats.quant * FF_QP2LAMBDA;
if (xvid_enc_stats.type == XVID_TYPE_PVOP)
- p->pict_type = AV_PICTURE_TYPE_P;
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
else if (xvid_enc_stats.type == XVID_TYPE_BVOP)
- p->pict_type = AV_PICTURE_TYPE_B;
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B;
else if (xvid_enc_stats.type == XVID_TYPE_SVOP)
- p->pict_type = AV_PICTURE_TYPE_S;
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_S;
else
- p->pict_type = AV_PICTURE_TYPE_I;
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
if (xvid_enc_frame.out_flags & XVID_KEYFRAME) {
- p->key_frame = 1;
+ avctx->coded_frame->key_frame = 1;
pkt->flags |= AV_PKT_FLAG_KEY;
if (x->quicktime_format)
return xvid_strip_vol_header(avctx, pkt,
xvid_enc_stats.hlength, xerr);
- } else
- p->key_frame = 0;
+ } else {
+ avctx->coded_frame->key_frame = 0;
+ }
pkt->size = xerr;