diff oggparsedirac.c @ 5514:52c7b29eca31 libavformat

oggdec: Set dts when known
author conrad
date Mon, 11 Jan 2010 05:51:09 +0000
parents 60671fac35ad
children 14f90d20ef05
line wrap: on
line diff
--- a/oggparsedirac.c	Mon Jan 11 00:31:55 2010 +0000
+++ b/oggparsedirac.c	Mon Jan 11 05:51:09 2010 +0000
@@ -47,7 +47,8 @@
 }
 
 // various undocument things: granule is signed (only for dirac!)
-static uint64_t dirac_gptopts(AVFormatContext *s, int idx, int64_t gp)
+static uint64_t dirac_gptopts(AVFormatContext *s, int idx, int64_t gp,
+                              int64_t *dts_out)
 {
     struct ogg *ogg = s->priv_data;
     struct ogg_stream *os = ogg->streams + idx;
@@ -59,6 +60,9 @@
     if (!dist)
         os->pflags |= PKT_FLAG_KEY;
 
+    if (dts_out)
+        *dts_out = dts;
+
     return pts;
 }
 
@@ -79,7 +83,8 @@
     return 1;
 }
 
-static uint64_t old_dirac_gptopts(AVFormatContext *s, int idx, uint64_t gp)
+static uint64_t old_dirac_gptopts(AVFormatContext *s, int idx, uint64_t gp,
+                                  int64_t *dts)
 {
     struct ogg *ogg = s->priv_data;
     struct ogg_stream *os = ogg->streams + idx;