From a5e84927962671c5ef26a29182f24e44648ef537 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 Sep 2011 05:35:38 +0200 Subject: [PATCH] bit: set AVPacket.pos Signed-off-by: Michael Niedermayer --- libavformat/bit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/bit.c b/libavformat/bit.c index 1fd011dfd2..9d4fa8e46c 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -52,6 +52,7 @@ static int read_packet(AVFormatContext *s, int sync; uint16_t* src=buf; int i, j, ret; + int64_t pos= avio_tell(pb); if(url_feof(pb)) return AVERROR_EOF; @@ -77,6 +78,7 @@ static int read_packet(AVFormatContext *s, flush_put_bits(&pbo); pkt->duration=1; + pkt->pos = pos; return 0; }