aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libxavs.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2013-11-18 08:08:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-14 00:29:13 +0100
commitd9b7557732f1993cd84b6084516a6f78d1195889 (patch)
tree272f0267d743d7fa3de7891a93ccbb8ec1f9e150 /libavcodec/libxavs.c
parent15d7b7d7ccb12234fc392ffd0d773285e84d5317 (diff)
downloadffmpeg-d9b7557732f1993cd84b6084516a6f78d1195889.tar.gz
avcodec/libxavs: 2nd attempt to fix compilation after b18c7c8d.
(cherry picked from commit 260fc0d95b025b03b2a15116526e4c83b1ca1a31) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libxavs.c')
-rw-r--r--libavcodec/libxavs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 4599a0d315..ffe3411c96 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -113,7 +113,7 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt,
static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet)
{
- XavsContext *x4 = ctx->priv_data;
+ XavsContext *x4 = avctx->priv_data;
xavs_nal_t *nal;
int nnal, i, ret;
xavs_picture_t pic_out;
@@ -129,29 +129,29 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
x4->pic.i_pts = frame->pts;
x4->pic.i_type = XAVS_TYPE_AUTO;
- x4->pts_buffer[ctx->frame_number % (ctx->max_b_frames+1)] = frame->pts;
+ x4->pts_buffer[avctx->frame_number % (avctx->max_b_frames+1)] = frame->pts;
}
if (xavs_encoder_encode(x4->enc, &nal, &nnal,
frame? &x4->pic: NULL, &pic_out) < 0)
return -1;
- ret = encode_nals(ctx, pkt, nal, nnal);
+ ret = encode_nals(avctx, pkt, nal, nnal);
if (ret < 0)
return -1;
if (!ret) {
if (!frame && !(x4->end_of_stream)) {
- if ((ret = ff_alloc_packet2(ctx, pkt, 4)) < 0)
+ if ((ret = ff_alloc_packet2(avctx, pkt, 4)) < 0)
return ret;
pkt->data[0] = 0x0;
pkt->data[1] = 0x0;
pkt->data[2] = 0x01;
pkt->data[3] = 0xb1;
- pkt->dts = 2*x4->pts_buffer[(x4->out_frame_count-1)%(ctx->max_b_frames+1)] -
- x4->pts_buffer[(x4->out_frame_count-2)%(ctx->max_b_frames+1)];
+ pkt->dts = 2*x4->pts_buffer[(x4->out_frame_count-1)%(avctx->max_b_frames+1)] -
+ x4->pts_buffer[(x4->out_frame_count-2)%(avctx->max_b_frames+1)];
x4->end_of_stream = END_OF_STREAM;
*got_packet = 1;
}
@@ -160,11 +160,11 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
avctx->coded_frame->pts = pic_out.i_pts;
pkt->pts = pic_out.i_pts;
- if (ctx->has_b_frames) {
+ if (avctx->has_b_frames) {
if (!x4->out_frame_count)
pkt->dts = pkt->pts - (x4->pts_buffer[1] - x4->pts_buffer[0]);
else
- pkt->dts = x4->pts_buffer[(x4->out_frame_count-1)%(ctx->max_b_frames+1)];
+ pkt->dts = x4->pts_buffer[(x4->out_frame_count-1)%(avctx->max_b_frames+1)];
} else
pkt->dts = pkt->pts;