changeset 5650:4e1430703688 libavformat

Fix timestamps.
author michael
date Thu, 11 Feb 2010 22:32:46 +0000
parents f3c5f3b0eb0d
children 399d973420de
files iv8.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/iv8.c	Wed Feb 10 20:27:53 2010 +0000
+++ b/iv8.c	Thu Feb 11 22:32:46 2010 +0000
@@ -55,9 +55,9 @@
 
 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 @@
     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;