changeset 2375:14828c79f290 libavformat

Set dts in tta demuxer
author conrad
date Sat, 11 Aug 2007 22:45:40 +0000
parents cbe3f8440741
children a67b89ba136d
files tta.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tta.c	Sat Aug 11 20:03:10 2007 +0000
+++ b/tta.c	Sat Aug 11 22:45:40 2007 +0000
@@ -109,15 +109,17 @@
 {
     TTAContext *c = s->priv_data;
     AVStream *st = s->streams[0];
-    int size;
+    int size, ret;
 
     // FIXME!
     if (c->currentframe > c->totalframes)
         return -1;
 
-    size = st->index_entries[c->currentframe++].size;
+    size = st->index_entries[c->currentframe].size;
 
-    return av_get_packet(&s->pb, pkt, size);
+    ret = av_get_packet(&s->pb, pkt, size);
+    pkt->dts = st->index_entries[c->currentframe++].timestamp;
+    return ret;
 }
 
 static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)