diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-03 04:25:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-03 04:42:24 +0100 |
commit | 7a5eb40ea19c6edf279196287181b0c4f0548cb0 (patch) | |
tree | 20e13f0898778b2cb4afdd9a2f683f23e90a3281 /libavcodec | |
parent | acf22ec69e92a5926d4c1baf1341ed9547018fe1 (diff) | |
download | ffmpeg-7a5eb40ea19c6edf279196287181b0c4f0548cb0.tar.gz |
audeo_get_buffer: fix pkt_pos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index fa94b7c124..ae26590a69 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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) |