aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggparsedirac.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-01-11 05:51:09 +0000
committerDavid Conrad <lessen42@gmail.com>2010-01-11 05:51:09 +0000
commit2d4970d88dd507de1595b8ee3b65cc5da73af5ea (patch)
tree51dc56697b7b49be44c6712da414a41eb8d93276 /libavformat/oggparsedirac.c
parent7ffd8332c7fa25174fad540d71e79f538d45a9a3 (diff)
downloadffmpeg-2d4970d88dd507de1595b8ee3b65cc5da73af5ea.tar.gz
oggdec: Set dts when known
Originally committed as revision 21134 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsedirac.c')
-rw-r--r--libavformat/oggparsedirac.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c
index fc1a193205..5a907ec178 100644
--- a/libavformat/oggparsedirac.c
+++ b/libavformat/oggparsedirac.c
@@ -47,7 +47,8 @@ static int dirac_header(AVFormatContext *s, int idx)
}
// 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 @@ static uint64_t dirac_gptopts(AVFormatContext *s, int idx, int64_t gp)
if (!dist)
os->pflags |= PKT_FLAG_KEY;
+ if (dts_out)
+ *dts_out = dts;
+
return pts;
}
@@ -79,7 +83,8 @@ static int old_dirac_header(AVFormatContext *s, int idx)
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;