summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-01 15:05:31 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-01 15:06:59 +0100
commite3ad9b828d6faaa7c14e1aaae59a3fa2605710af (patch)
treefa490f23d0ab6e4af96f17c2ec9a813923a4c24d /src
parent04f2f3d766d6ceb2b5f4120be28cab04816e048b (diff)
downloadadvtime-e3ad9b828d6faaa7c14e1aaae59a3fa2605710af.tar.gz
advtime-e3ad9b828d6faaa7c14e1aaae59a3fa2605710af.tar.bz2
advtime-e3ad9b828d6faaa7c14e1aaae59a3fa2605710af.zip
video_decode: cur_dts includes start time, so substract it for frame dts
Diffstat (limited to 'src')
-rw-r--r--src/video_decode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_decode.c b/src/video_decode.c
index dc5d00e..13bf0e1 100644
--- a/src/video_decode.c
+++ b/src/video_decode.c
@@ -172,6 +172,8 @@ video_decode_get_frame(struct video_decode *_vd, struct video_frame **frame)
f->base.height = vd->codec_ctx->height;
f->base.stride = f->frame->linesize[0];
f->base.dts = vd->fmt_ctx->streams[vd->stream]->cur_dts;
+ if (vd->fmt_ctx->start_time != AV_NOPTS_VALUE)
+ f->base.dts -= vd->fmt_ctx->start_time;
if (*frame == NULL)
*frame = &f->base;