aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-11 22:32:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-11 22:32:46 +0000
commitf2d56513d71c5e151c4a6ca95020605a6179dbbb (patch)
tree5673289ceb00be4844dfa4900719b1d25a3a7c4d
parent23b361bacaa73e40a55e1ba48440abefb274bf95 (diff)
downloadffmpeg-f2d56513d71c5e151c4a6ca95020605a6179dbbb.tar.gz
Fix timestamps.
Originally committed as revision 21761 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/iv8.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libavformat/iv8.c b/libavformat/iv8.c
index 33894ad9f8..299de45ba8 100644
--- a/libavformat/iv8.c
+++ b/libavformat/iv8.c
@@ -55,9 +55,9 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
static int read_packet(AVFormatContext *s, AVPacket *pkt)
{
- int ret, size, pts;
-
- get_be16(s->pb); // 257
+ int ret, size, pts, type;
+retry:
+ type= get_be16(s->pb); // 257 or 258
size= get_be16(s->pb);
get_be16(s->pb); //some flags, 0x80 indicates end of frame
@@ -69,9 +69,14 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if(size<1)
return -1;
+ if(type==258){
+ url_fskip(s->pb, size);
+ goto retry;
+ }
+
ret= av_get_packet(s->pb, pkt, size);
- pkt->pts= pkt->dts= pts;
+ pkt->pts= pts;
pkt->pos-=16;
pkt->stream_index = 0;