diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-17 12:41:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-17 12:41:42 +0100 |
commit | f4f7888bab7061f08c54356c285adaba24383dc0 (patch) | |
tree | cc1b39e0754ac80908cf929f71e5127b83174c48 /libavcodec/libxvid.c | |
parent | a0c0629dd963b00f989172f0c599353b6b288c37 (diff) | |
parent | ffe04c330335add4c6d70ab0bb98e6b3f4f7abfa (diff) | |
download | ffmpeg-f4f7888bab7061f08c54356c285adaba24383dc0.tar.gz |
Merge commit 'ffe04c330335add4c6d70ab0bb98e6b3f4f7abfa'
* commit 'ffe04c330335add4c6d70ab0bb98e6b3f4f7abfa':
libxvid: use the AVFrame API properly.
pcxenc: use the AVFrame API properly.
roqvideo: remove unused variables
libschroedingerenc: use the AVFrame API properly.
Conflicts:
libavcodec/pcxenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libxvid.c')
-rw-r--r-- | libavcodec/libxvid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index d4c71490e7..40b3bffacf 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -56,7 +56,6 @@ struct xvid_context { int me_flags; /**< Motion Estimation flags */ int qscale; /**< Do we use constant scale? */ int quicktime_format; /**< Are we in a QT-based format? */ - AVFrame encoded_picture; /**< Encoded frame information */ char *twopassbuffer; /**< Character buffer for two-pass */ char *old_twopassbuffer; /**< Old character buffer (two-pass) */ char *twopassfile; /**< second pass temp file name */ @@ -651,7 +650,9 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) { } x->encoder_handle = xvid_enc_create.handle; - avctx->coded_frame = &x->encoded_picture; + avctx->coded_frame = av_frame_alloc(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); return 0; fail: @@ -665,7 +666,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, int xerr, i, ret, user_packet = !!pkt->data; char *tmp; struct xvid_context *x = avctx->priv_data; - AVFrame *p = &x->encoded_picture; + AVFrame *p = avctx->coded_frame; int mb_width = (avctx->width + 15) / 16; int mb_height = (avctx->height + 15) / 16; @@ -678,7 +679,6 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, /* Start setting up the frame */ xvid_enc_frame.version = XVID_VERSION; xvid_enc_stats.version = XVID_VERSION; - *p = *picture; /* Let Xvid know where to put the frame. */ xvid_enc_frame.bitstream = pkt->data; |