[FFmpeg-cvslog] audeo_get_buffer: fix pkt_pos

Michael Niedermayer git at videolan.org
Sat Dec 3 04:50:40 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec  3 04:25:34 2011 +0100| [7a5eb40ea19c6edf279196287181b0c4f0548cb0] | committer: Michael Niedermayer

audeo_get_buffer: fix pkt_pos

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a5eb40ea19c6edf279196287181b0c4f0548cb0
---

 libavcodec/utils.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index fa94b7c..ae26590 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)



More information about the ffmpeg-cvslog mailing list