audeo_get_buffer: fix pkt_pos

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-03 04:25:34 +01:00
parent acf22ec69e
commit 7a5eb40ea1

View File

@ -349,8 +349,14 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
frame->linesize[0] = buf->linesize[0];
memcpy(frame->data, buf->data, sizeof(frame->data));
if (avctx->pkt) frame->pkt_pts = avctx->pkt->pts;
else frame->pkt_pts = AV_NOPTS_VALUE;
if (avctx->pkt) {
frame->pkt_pts = avctx->pkt->pts;
frame->pkt_pos = avctx->pkt->pos;
} else {
frame->pkt_pts = AV_NOPTS_VALUE;
frame->pkt_pos = -1;
}
frame->reordered_opaque = avctx->reordered_opaque;
if (avctx->debug & FF_DEBUG_BUFFERS)